capture all possible errors that can happen during UUID conversion

This commit is contained in:
Jakub Trllo 2024-12-05 14:43:18 +01:00
parent 38aa810542
commit 023e0722f8
2 changed files with 2 additions and 2 deletions

View file

@ -382,7 +382,7 @@ class LoaderController(BackendLoaderController, FrontendLoaderController):
try:
uuid.UUID(repre_id)
repre_ids.add(repre_id)
except ValueError:
except (ValueError, TypeError, AttributeError):
pass
product_ids = self._products_model.get_product_ids_by_repre_ids(

View file

@ -230,7 +230,7 @@ class ContainersModel:
for repre_id in representation_ids:
try:
uuid.UUID(repre_id)
except ValueError:
except (ValueError, TypeError, AttributeError):
output[repre_id] = RepresentationInfo.new_invalid()
continue
repre_info = self._repre_info_by_id.get(repre_id)