mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Warn if course has no shortname
This commit is contained in:
parent
890ba80db4
commit
813ca3eb82
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ def populate_subjects(sender, **kwargs):
|
||||||
Course.objects.get_or_create(
|
Course.objects.get_or_create(
|
||||||
name=filename, shortname=shortname)
|
name=filename, shortname=shortname)
|
||||||
added_courses += 1
|
added_courses += 1
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
print('Warn: Improperly formatted course record:', filename)
|
||||||
|
|
||||||
print('Added', added_courses, 'courses')
|
print('Added', added_courses, 'courses')
|
||||||
print('Skipped', existing_courses, 'already existing courses\n')
|
print('Skipped', existing_courses, 'already existing courses\n')
|
||||||
|
|
Loading…
Reference in a new issue