From: Jan Szejko Date: Thu, 27 Apr 2017 14:08:27 +0000 (+0200) Subject: minor cleanup X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/253fa9d32eb8e5307432e8813da3334afd325e2b minor cleanup --- diff --git a/apps/cover/management/commands/refresh_covers.py b/apps/cover/management/commands/refresh_covers.py index 540304dc..2c78db9b 100644 --- a/apps/cover/management/commands/refresh_covers.py +++ b/apps/cover/management/commands/refresh_covers.py @@ -36,12 +36,12 @@ class Command(BaseCommand): print 'Download url already present in image %s' % same_url.get().id continue try: - t = URLOpener().open(flickr_data['download_url']).read() + t = URLOpener().open(flickr_url).read() except urllib.URLError: print 'Broken download url' except IOError: print 'Connection failed' else: - image.download_url = flickr_data['download_url'] + image.download_url = flickr_url image.file.save(image.file.name, ContentFile(t)) image.save()