diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py index bf047f03e237b7d65daa6e67b2064723fd8dea0a..28dc6997455d5819cee30bdbf0a95bc771d93a16 100644 --- a/src/caosdb/common/models.py +++ b/src/caosdb/common/models.py @@ -605,36 +605,6 @@ class Entity(object): return result_list - def print_error_tree(self, error_tree=None, print_out=True): - """Print an error tree created with get_errors_deep. Set print_out to - False if you just want to have the resulting string returned. - - If error_tree is set to None, call get_errors_deep and print the - resulting tree. - """ - - if error_tree is None: - error_tree = self.get_errors_deep() - text = "" - - for i in error_tree: - text += "ERROR " + str(i[0].code) + \ - ": " + str(i[0].description) + "\n" - - for tree_entry in reversed(i[1]): - # print(tree_entry) - text += " in " + str(tree_entry.__class__) + \ - " " + str(tree_entry.type) + \ - ": " + str(tree_entry.name) + " (ID: " + \ - str(tree_entry.id) + ")" - text += "\n" - text += "\n" - - if print_out: - print(text) - - return text - def has_errors(self): ''' @return True: if and only if this entities has any error messages.