Skip to content
Snippets Groups Projects
Commit a360d4fe authored by florian's avatar florian
Browse files

BUG: Remove remaining ContainerErrors

parent 9a89695f
No related branches found
No related tags found
No related merge requests found
......@@ -2637,10 +2637,10 @@ class Container(list):
if len(self) == 0:
if raise_exception_on_error:
ce = ContainerError(
"There are no entities to be deleted. This container is empty.",
self)
raise TransactionError(ce)
te = TransactionError(
msg="There are no entities to be deleted. This container is empty.",
container=self)
raise te
return self
self.clear_server_messages()
......@@ -2672,9 +2672,10 @@ class Container(list):
if len(id_str) == 0:
if raise_exception_on_error:
ce = ContainerError(
"There are no entities to be deleted.", self)
raise TransactionError(ce)
te = TransactionError(
msg="There are no entities to be deleted.",
continer=self)
raise te
return self
entity_url_segments = [_ENTITY_URI_SEGMENT, "&".join(id_str)]
......@@ -2828,10 +2829,10 @@ class Container(list):
"""Update these entites."""
if len(self) < 1:
ce = ContainerError(
"There are no entities to be updated. This container is empty.",
self)
raise TransactionError(ce)
te = TransactionError(
msg="There are no entities to be updated. This container is empty.",
container=self)
raise te
self.clear_server_messages()
insert_xml = etree.Element("Update")
......@@ -3021,10 +3022,10 @@ class Container(list):
insert_xml.append(entity_xml)
if len(self) > 0 and len(insert_xml) < 1:
ce = ContainerError(
"There are no entities to be inserted. This container contains existent entities only.",
self)
raise TransactionError(ce)
te = TransactionError(
msg="There are no entities to be inserted. This container contains existent entities only.",
container=self)
raise te
_log_request("POST: " + _ENTITY_URI_SEGMENT +
('' if flags is None else "?" + str(flags)), insert_xml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment