1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 01:58:23 +02:00

Display team solutions

This commit is contained in:
Yohann D'ANELLO
2020-04-30 01:20:50 +02:00
parent 3fdda5a030
commit f08f52c129
5 changed files with 44 additions and 7 deletions

View File

@ -210,7 +210,11 @@ class Command(BaseCommand):
obj_dict["user"] = TFJMUser.objects.get(args[1]),
obj_dict["type"] = args[4].lower()
else:
obj_dict["team"] = Team.objects.get(pk=args[2])
try:
obj_dict["team"] = Team.objects.get(pk=args[2])
except Team.DoesNotExist:
print("Team with pk {} does not exist, ignoring".format(args[2]))
continue
with transaction.atomic():
if args[4] != "MOTIVATION_LETTER":
Authorization.objects.create(**obj_dict)