From 2c2ec65a1b18a8f7567bc281e61c46f67f5aaef3 Mon Sep 17 00:00:00 2001 From: "Pavel Turinsky (DebianVM @ Zr)" Date: Tue, 8 Jun 2021 20:56:51 +0000 Subject: [PATCH] Zvraceny zvracene zmeny migr 0058 --- .../migrations/0058_problem_to_uloha_tema_clanek.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py index ebd2d6fb..ce84e542 100644 --- a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py +++ b/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), ]