Browse Source

Zvraceny zvracene zmeny migr 0058

middleware_test
Pavel Turinsky (DebianVM @ Zr) 4 years ago
parent
commit
2c2ec65a1b
  1. 10
      seminar/migrations/0058_problem_to_uloha_tema_clanek.py

10
seminar/migrations/0058_problem_to_uloha_tema_clanek.py

@ -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),
]

Loading…
Cancel
Save