X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/36a272da03363cae901a0aa0d768735da3ea5130..dab276bc0a4bdb890d7a356db21abf40fe7311bb:/apps/cover/management/commands/refresh_covers.py?ds=sidebyside 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()