Catch potential error updating image that does not exist...

This commit is contained in:
Oliver committed 2021-06-22 22:23:27 +10:00
1 parent 2fc7c3d883
commit b8e4b58df0
3 files changed
+4 -6

No files matched your search

-2
View File
@@ -44,8 +44,6 @@ class CompanyConfig(AppConfig):
company.image.render_variations(replace=False)
except FileNotFoundError:
logger.warning(f"Image file '{company.image}' missing")
company.image = None
company.save()
except UnidentifiedImageError:
logger.warning(f"Image file '{company.image}' is invalid")
except (OperationalError, ProgrammingError):