From 614d795b6aa9b6e89f12aa4c3a328c7795811fdf Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Wed, 19 Aug 2020 23:45:22 +0200 Subject: [PATCH] =?UTF-8?q?Zlobiv=C3=A1=200058=20m=C3=A1=20taky=20logovat,?= =?UTF-8?q?=20aspo=C5=88=20do=C4=8Dasn=C4=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/migrations/0058_problem_to_uloha_tema_clanek.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py index 333f5453..1b170eb8 100644 --- a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py +++ b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py @@ -6,6 +6,9 @@ from django.db import migrations from django.db.models import Q +import logging +logger = logging.getLogger(__name__) + def poskladej_strom(apps, rodic, *texty): Text = apps.get_model('seminar', 'Text') TextNode = apps.get_model('seminar', 'TextNode') @@ -42,6 +45,7 @@ def uloha_to_Uloha(apps,schema_editor): ulohy = Problem.objects.filter(typ = 'uloha') for uold in ulohy: + logger.debug('u') unew = Uloha.objects.create( problem_ptr = uold, # Zakomentované fieldy by se už měly nacházet v příslušném problému @@ -83,6 +87,7 @@ def clanek_to_Clanek(apps,schema_editor): clanky = Problem.objects.filter(Q(typ='org-clanek') | Q(typ='res-clanek')) for cl in clanky: + logger.debug('c') # Vybereme vhodné číslo pro článek z čísla zadání a čísla řešení: if cl.cislo_zadani_old is None: cislo = cl.cislo_reseni_old @@ -121,6 +126,7 @@ def tema_to_Tema(apps, schema_editor): temata = Problem.objects.filter(Q(typ = 'tema') | Q(typ='serial')) for t in temata: + logger.debug('t') # Vymyslíme správně ročník: if t.cislo_zadani_old is None and t.cislo_reseni_old is None: rocnik = None