Commit 8b5d9e8a authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch '511-dont-save-broken-photos' into 'master'

Do not create Photo objects for non-photo files when uploading albums

Closes #511

See merge request !577
parents bd41b5e0 b9742833
......@@ -70,6 +70,7 @@ def save_photo(request, archive_file, photo, album):
except (OSError, AttributeError):
messages.add_message(request, messages.WARNING,
_("Ignoring {}").format(photo_filename))
photo_obj.delete()
else:
photo_obj.save()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment