Skip to content

Commit c5de073

Browse files
committed
[entity] move checks for name and type
1 parent 9afd8f6 commit c5de073

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nixio/entity.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ def __init__(self, nixfile, nixparent, h5group):
2222
def create_new(cls, nixfile, nixparent, h5parent, name=None, type_=None):
2323
if name and type_:
2424
id_ = util.create_id()
25-
util.check_entity_name_and_type(name, type_)
2625
if not name:
2726
name = util.create_id()
2827
id_ = name
29-
util.check_entity_type(type_)
28+
util.check_entity_name_and_type(name, type_)
3029

3130
h5group = h5parent.open_group(name)
3231
h5group.set_attr("name", name)

0 commit comments

Comments
 (0)