From cf40f0df81bd955f131bc9472369fb9e4061a3d6 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 19 Dec 2013 17:54:18 +0100 Subject: [PATCH] fix save --- teleforma/management/commands/teleforma-copy-seminars.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teleforma/management/commands/teleforma-copy-seminars.py b/teleforma/management/commands/teleforma-copy-seminars.py index df1ee1fa..3028ea76 100644 --- a/teleforma/management/commands/teleforma-copy-seminars.py +++ b/teleforma/management/commands/teleforma-copy-seminars.py @@ -41,9 +41,11 @@ class Command(BaseCommand): source = getattr(seminar, field.attname) destination = getattr(clone, field.attname) for item in source.all(): + print item item.period = from_period item.save() item_clone = item.clone() + item_clone.save() item_clone.readers = [] item_clone.period = to_period item_clone.save() @@ -54,6 +56,7 @@ class Command(BaseCommand): questions = seminar.question.all() for question in questions: question_clone = question.clone() + question_clone.save() question_clone.seminar = clone question.save() print ("cloned and assigned:", question) -- 2.39.5