Zvraceny zvracene zmeny migr 0058
This commit is contained in:
parent
a8af456724
commit
2c2ec65a1b
1 changed files with 4 additions and 6 deletions
|
@ -49,7 +49,7 @@ def uloha_to_Uloha(apps,schema_editor):
|
||||||
TextNode = apps.get_model('seminar', 'TextNode')
|
TextNode = apps.get_model('seminar', 'TextNode')
|
||||||
|
|
||||||
ulohy = Problem.objects.filter(typ = 'uloha')
|
ulohy = Problem.objects.filter(typ = 'uloha')
|
||||||
for uold in ulohy[1:]:
|
for uold in ulohy:
|
||||||
unew = Uloha.objects.create(
|
unew = Uloha.objects.create(
|
||||||
# Zakomentované fieldy by se už měly nacházet v příslušném problému
|
# Zakomentované fieldy by se už měly nacházet v příslušném problému
|
||||||
nazev = uold.nazev,
|
nazev = uold.nazev,
|
||||||
|
@ -66,8 +66,6 @@ def uloha_to_Uloha(apps,schema_editor):
|
||||||
unew.save()
|
unew.save()
|
||||||
unew.opravovatele.add(*uold.opravovatele.all())
|
unew.opravovatele.add(*uold.opravovatele.all())
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
# Nody:
|
# Nody:
|
||||||
zadani_node = UlohaZadaniNode.objects.create(uloha = unew)
|
zadani_node = UlohaZadaniNode.objects.create(uloha = unew)
|
||||||
poskladej_strom(apps, zadani_node, uold.text_zadani)
|
poskladej_strom(apps, zadani_node, uold.text_zadani)
|
||||||
|
@ -164,7 +162,7 @@ class Migration(migrations.Migration):
|
||||||
operations = [
|
operations = [
|
||||||
# ashes to Ashes, dust to Dust....
|
# ashes to Ashes, dust to Dust....
|
||||||
migrations.RunPython(uloha_to_Uloha, migrations.RunPython.noop),
|
migrations.RunPython(uloha_to_Uloha, migrations.RunPython.noop),
|
||||||
# migrations.RunPython(tema_to_Tema, migrations.RunPython.noop),
|
migrations.RunPython(tema_to_Tema, migrations.RunPython.noop),
|
||||||
# migrations.RunPython(clanek_to_Clanek, migrations.RunPython.noop),
|
migrations.RunPython(clanek_to_Clanek, migrations.RunPython.noop),
|
||||||
# migrations.RunPython(konfery_rucne, migrations.RunPython.noop),
|
migrations.RunPython(konfery_rucne, migrations.RunPython.noop),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue