From f26f4a5c0fc65b031860e410dc4ecb3709d72170 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Fri, 4 Sep 2020 14:32:58 +0200 Subject: [PATCH] Fix --- seminar/migrations/0087_fix_polymorphism.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/migrations/0087_fix_polymorphism.py b/seminar/migrations/0087_fix_polymorphism.py index d38877ba..40ce9adf 100644 --- a/seminar/migrations/0087_fix_polymorphism.py +++ b/seminar/migrations/0087_fix_polymorphism.py @@ -25,7 +25,7 @@ def fix_ctypes(parent: str, children, apps, schema_editor): # Ostatní instance mají mít explicitně content type pro rodiče new_ct = ContentType.objects.get_for_model(Parent) for obj in Parent.objects.filter(polymorphic_ctype__isnull=True): - log.warn(f"{parent} {obj} neměl content type -- nejspíš to je instance přímo {parent}!") + log.warn(f"{parent} \"{obj}\" neměl content type -- nejspíš to je instance přímo {parent}!") obj.polymorphic_ctype=new_ct obj.save() @@ -36,7 +36,7 @@ def fix_treenode(apps, schema_editor): fix_ctypes("TreeNode", children, apps, schema_editor) def fix_problem(apps, schema_editor): - children = ['Tema', 'Clanek', 'Uloha', 'Konfera'] + children = ['Tema', 'Clanek', 'Uloha'] # FIXME: Konfera z nějakého důvodu tenhle field vůbec nemá, asi je to špatně. fix_ctypes("Problem", children, apps, schema_editor) class Migration(migrations.Migration):