-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a block with only "name" provided ignores the "name" value #524
Comments
the behaviour is odd in more than one way:
I would suggest to make sure that type is not empty and if name is not given, it is set to the id. @achilleas-k is there a need to allow an empty type (in neo-nixio) |
This is definitely a bug. The name and type should both be required. The check in the entity was for entities that don't have a name, which at some point was the |
@jgrewe Need a confirmation for the above because my memory might be broken. Name and Type are required in NIX, right? |
They should be required. Wasn't sure myself if we decided to allow empty types e.g. in the neo nix io for some reason I forgot... |
When creating a block and providing only the name, but not the type, the name value is ignored and the block name defaults to the blocks ID.
e.g.
b = nf.create_block(name="I-shall-be-ignored")
The corresponding lines responsible can be found in
block.py
andentity.py
:nixpy/nixio/block.py
Line 55 in c5ffc3b
nixpy/nixio/entity.py
Line 23 in c5ffc3b
Is this expected behavior and what would be the reason for ignoring a name value when the type has not been provided?
The text was updated successfully, but these errors were encountered: