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

ENH: id and name in error output

parent abd6b45b
Branches
Tags
No related merge requests found
......@@ -369,8 +369,8 @@ class EntityError(TransactionError):
def _repr_head(self, indent):
if hasattr(self, 'entity') and self.entity is not None:
return (str(type(self.entity).__name__).upper() + " (" +
str(self.entity.id) + (("," + "'" + str(self.entity.name) + "'") if
return (str(type(self.entity).__name__).upper() + " (id: " +
str(self.entity.id) + ((", name: " + "'" + str(self.entity.name) + "'") if
self.entity.name is not None else '') + ") CAUSED " +
TransactionError._repr_head(self, indent))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment