Zvraceny zvracene zmeny migr 0058

This commit is contained in:
Pavel Turinsky (DebianVM @ Zr) 2021-06-08 20:56:51 +00:00
parent a8af456724
commit 2c2ec65a1b

View file

@ -49,7 +49,7 @@ def uloha_to_Uloha(apps,schema_editor):
TextNode = apps.get_model('seminar', 'TextNode')
ulohy = Problem.objects.filter(typ = 'uloha')
for uold in ulohy[1:]:
for uold in ulohy:
unew = Uloha.objects.create(
# Zakomentované fieldy by se už měly nacházet v příslušném problému
nazev = uold.nazev,
@ -66,8 +66,6 @@ def uloha_to_Uloha(apps,schema_editor):
unew.save()
unew.opravovatele.add(*uold.opravovatele.all())
return
# Nody:
zadani_node = UlohaZadaniNode.objects.create(uloha = unew)
poskladej_strom(apps, zadani_node, uold.text_zadani)
@ -164,7 +162,7 @@ class Migration(migrations.Migration):
operations = [
# ashes to Ashes, dust to Dust....
migrations.RunPython(uloha_to_Uloha, migrations.RunPython.noop),
# migrations.RunPython(tema_to_Tema, migrations.RunPython.noop),
# migrations.RunPython(clanek_to_Clanek, migrations.RunPython.noop),
# migrations.RunPython(konfery_rucne, migrations.RunPython.noop),
migrations.RunPython(tema_to_Tema, migrations.RunPython.noop),
migrations.RunPython(clanek_to_Clanek, migrations.RunPython.noop),
migrations.RunPython(konfery_rucne, migrations.RunPython.noop),
]