Avoid a crash when no photos are found for a flat

This commit is contained in:
Lucas Verney 2018-03-04 18:40:57 +01:00
parent 3855888bcb
commit 0c9f7d3067

View File

@ -157,6 +157,8 @@ class Flat(BASE):
""" """
Photos validation method Photos validation method
""" """
if not photos:
photos = []
for photo in photos: for photo in photos:
try: try:
# Remove computed hash to avoid storing it in db # Remove computed hash to avoid storing it in db