2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 20:51:00 +00:00

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

This commit is contained in:
Oliver
2021-06-22 22:19:22 +10:00
parent 2fc7c3d883
commit b8e4b58df0
3 changed files with 4 additions and 6 deletions

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):