diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index 6f134ea868f5d8bc5514207b63f6107fbf38c405..711f3f94e2d70e31043aa73f5ad8cf24eb2f1d7d 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -2734,8 +2734,10 @@ class Container(list): description="This entity has no identifier. It cannot be retrieved.")) if raise_exception_on_error: - raise EntityError( - "This entity has no identifier. It cannot be retrieved.", entity) + ee = EntityError( + "This entity has no identifier. It cannot be retrieved.", + entity) + raise TransactionError(ee) else: entity.is_valid = lambda: False else: @@ -3791,7 +3793,9 @@ def raise_errors(arg0): """ transaction_error = _evaluate_and_add_error(TransactionError(), arg0) - raise transaction_error + # Raise if any error was found + if len(transaction_error.all_errors) > 0: + raise transaction_error def delete(ids, raise_exception_on_error=True):