We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac64c88 commit fbb0dfbCopy full SHA for fbb0dfb
1 file changed
odml/property.py
@@ -123,6 +123,14 @@ def name(self):
123
124
@name.setter
125
def name(self, new_name):
126
+ if self.name == new_name:
127
+ return
128
+
129
+ curr_parent = self.parent
130
+ if hasattr(curr_parent, "properties") and new_name in curr_parent.properties:
131
132
+ raise KeyError("Object with the same name already exists!")
133
134
self._name = new_name
135
136
def __repr__(self):
0 commit comments