From: Guillaume Pellerin Date: Tue, 28 Jun 2016 10:31:45 +0000 (+0200) Subject: bugfix X-Git-Tag: search~2^2~28 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d594d7c00333994a37be54bc00f63e6a0b48899e;p=telemeta.git bugfix --- diff --git a/telemeta/management/commands/telemeta-create-boilerplate.py b/telemeta/management/commands/telemeta-create-boilerplate.py index cccb86fc..4a9a07c9 100644 --- a/telemeta/management/commands/telemeta-create-boilerplate.py +++ b/telemeta/management/commands/telemeta-create-boilerplate.py @@ -27,11 +27,11 @@ class Command(BaseCommand): def handle(self, *args, **options): collections = MediaCollection.objects.filter(code=self.code) if collections: - collection = collection[0] + collection = collections[0] else: collection = MediaCollection(title=self.code, code=self.code, public_access='full') collection.save() - + selection, c = Selection.objects.get_or_create(title='Tests') if c: