From d594d7c00333994a37be54bc00f63e6a0b48899e Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 28 Jun 2016 12:31:45 +0200 Subject: [PATCH] bugfix --- telemeta/management/commands/telemeta-create-boilerplate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.5