From: Guillaume Pellerin Date: Wed, 23 Dec 2015 15:57:43 +0000 (+0100) Subject: try fix X-Git-Tag: 2.8.1-pro~256 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=4045365ebcd8d5ab6eb0da7f0c6c2cb295041ffe;p=teleforma.git try fix --- diff --git a/teleforma/management/commands/teleforma-copy-seminars.py b/teleforma/management/commands/teleforma-copy-seminars.py index 5d324e11..69d6d606 100644 --- a/teleforma/management/commands/teleforma-copy-seminars.py +++ b/teleforma/management/commands/teleforma-copy-seminars.py @@ -58,6 +58,7 @@ class Command(BaseCommand): clone.date_forced = datetime.datetime(2016, 1, 1) clone.period = to_period clone.status = 1 + clone.quiz = seminar.quiz clone.save() log = 'new seminar:' + unicode(clone) logger.logger.info(log) @@ -87,6 +88,3 @@ class Command(BaseCommand): question_clone.seminar = clone question_clone.save() # print ("question cloned and assigned:", question_clone) - - clone.quiz = seminar.quiz - clone.save() diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index 19029513..c5b5557c 100755 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -106,7 +106,7 @@ class Seminar(ClonableMixin, Displayable): blank=True, null=True, on_delete=models.SET_NULL) date_added = models.DateTimeField(_('date added'), auto_now_add=True) date_modified = models.DateTimeField(_('date modified'), auto_now=True) - date_forced = models.DateTimeField(_('date forced'), null=True, blank=True) + date_forced = models.DateTimeField(_('date forced'), null=True, blank=True) objects = DisplayableManager()