]> git.parisson.com Git - teleforma.git/commitdiff
fix field parsing
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 17:14:46 +0000 (18:14 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 17:14:46 +0000 (18:14 +0100)
teleforma/management/commands/teleforma-copy-seminars.py

index c859f39087863f8d8a7e6d9616475a09c5763333..754915f698838330b66168c72391744e4896bd32 100644 (file)
@@ -23,8 +23,8 @@ class Command(BaseCommand):
     def handle(self, *args, **kwargs):
         to_year = int(args[-1])
         from_year = int(args[-2])
-        to_period = Period.objects.get_or_create(name=str(to_year))
-        from_period = Period.objects.get_or_create(name=str(from_year))
+        to_period, c = Period.objects.get_or_create(name=str(to_year))
+        from_period, c = Period.objects.get_or_create(name=str(from_year))
 
         for seminar in Seminar.objects.all():
             if seminar.expiry_date: