diff --git a/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py b/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py index bdec6c2c..edccf3c9 100644 --- a/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py +++ b/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py @@ -8,7 +8,7 @@ def vrat_verejnost(apps, schema_editor): Cislo = apps.get_model('seminar', 'Cislo') for cislo in Cislo.objects.all(): - cislo.verejna_vysledkovka = any(cislo.deadline_v_cisle.filter(typ=Deadline.TYP_CISLA)) + cislo.verejna_vysledkovka = cislo.deadline_v_cisle.filter(typ=Deadline.TYP_CISLA, verejna_vysledkovka=True).exists() cislo.save()