fixed issues after 2.3.0, one that has been caused by refactoring, the other existed already

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-03-02 08:35:37 +01:00
parent 83dfbed8b2
commit ffe4050d00
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class Asset:
@staticmethod
def from_list_dict(asset_dict_list: list[dict]) -> list[Asset]:
return [Asset.from_dict(asset_dict) for asset_dict in asset_dict_list]
return [Asset.from_dict(asset_dict) for asset_dict in asset_dict_list if isinstance(asset_dict,dict)]
@staticmethod
def list_to_dict(asset_list: list[Asset]) -> list[dict]:

View File

@ -54,10 +54,10 @@ def catch_db_exception(function_to_decorate):
raise schema_error
except NetworkError as net_error:
raise net_error
except ValueError:
except ValueError as e:
logger.info(f"ValueError in Query/DB instruction: {e}: raising DBConcurrencyError")
raise DBConcurrencyError
except AttributeError:
except AttributeError as e:
logger.info(f"Attribute in Query/DB instruction: {e}: raising DBConcurrencyError")
raise DBConcurrencyError
except Exception as e: