frontend: Fix missing save() call (Django 1.8 change)

[18:51:48] <OatmealDome> I think it might be fixable if t.save() is put here https://github.com/dolphin-emu/fifoci/blob/master/frontend/fifoci/management/commands/import_results.py#L64

From the Django 1.8 docs:

> Assigning unsaved objects to a ForeignKey, GenericForeignKey, and OneToOneField now raises a ValueError.

Fixes a latent issue that has been present since the Django 1.7 -> 1.10
update back in 2017.
This commit is contained in:
Léo Lam
2022-01-03 19:06:31 +01:00
parent a4b3ca7939
commit 95c26937fb

View File

@@ -61,6 +61,7 @@ def import_result(type, ver, parent, zf, dff_short_name, result):
except Type.DoesNotExist:
t = Type()
t.type = type
t.save()
try:
r = Result.objects.get(dff=dff, ver=ver, type=t)