diff --git a/cmsplugin_gallery/migrations/0006_auto_20180411_1046.py b/cmsplugin_gallery/migrations/0006_auto_20180411_1046.py index b15359d..f262214 100644 --- a/cmsplugin_gallery/migrations/0006_auto_20180411_1046.py +++ b/cmsplugin_gallery/migrations/0006_auto_20180411_1046.py @@ -12,16 +12,19 @@ def migrate_to_filer(apps, schema_editor): GalleryImage = apps.get_model('cmsplugin_gallery', 'Image') images = GalleryImage.objects.all() - for image in images: - if image.src: - image_src = Image.objects.get_or_create( - file=image.src.file, - defaults={ - 'name': image.src.name - } - )[0] - - images.filter(pk=image.pk).update(image_src=image_src) + try: + for image in images: + if image.src: + image_src = Image.objects.get_or_create( + file=image.src.file, + defaults={ + 'name': image.src.name + } + )[0] + + images.filter(pk=image.pk).update(image_src=image_src) + except Exception as e: + print e class Migration(migrations.Migration): diff --git a/setup.py b/setup.py index 700e379..be3a058 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='cmsplugin_gallery', - version='1.1.7', + version='1.1.8', author='Piotr Kilczuk', author_email='piotr@tymaszweb.pl', url='http://github.com/centralniak',