Skip to content

Fix properties in HasProcess#1180

Merged
superstar54 merged 4 commits into
aiidalab:mainfrom
superstar54:fix_check_properties
Feb 21, 2025
Merged

Fix properties in HasProcess#1180
superstar54 merged 4 commits into
aiidalab:mainfrom
superstar54:fix_check_properties

Conversation

@superstar54
Copy link
Copy Markdown
Member

@superstar54 superstar54 commented Feb 20, 2025

Fix issue reported by @AndresOrtegaGuerrero in this comment

The input properties is a orm.List, and we return the raw list value for safety.

The input `properties` is a orm.List, and we return the raw list value for safety.
@superstar54
Copy link
Copy Markdown
Member Author

Hi @AndresOrtegaGuerrero , could you plase test importing the data again?

@AndresOrtegaGuerrero
Copy link
Copy Markdown
Member

So the issue @superstar54 is that we tested with @edan-bainglass , and we realize that this is occuring in one particular account . I produce a node and when i tried to imported in the user it didnt work , but in my container and edan it works.
Edan and I have this behaviour for the node ,

In [4]: node.inputs.properties
Out[4]: <List: uuid: 2fd7b49d-90d4-4a29-aeda-16fa3a3dbdcc (pk: 7738) value: ['vibronic']>

while in his account

In [2]: node.inputs.properties
Out[2]: <Data: uuid: 30f203c9-c12b-425f-a893-ee93f565cd4d (pk: 13234)>

Comment on lines +97 to +103
# read the attributes directly instead of using the `get_list` method
# to avoid error in case of the orm.List object being converted to a orm.Data object
return (
process_node.inputs.properties.base.attributes.get("list")
if process_node
else []
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How/when/why does this conversion occur?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess different aiida-core versions are used, but this could be a bug in aiida-core.
@AndresOrtegaGuerrero may provide more details.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the past, @superstar54 and I observed this behavior. I don’t fully understand why, but when importing an archive, it sometimes changes data types to Data. In this case, the user has the same aiida-core version as the exporting environment, so I have no idea why this happens. Should we reach out to someone from aiida-core for clarification?

Copy link
Copy Markdown
Member Author

@superstar54 superstar54 Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @AndresOrtegaGuerrero , yes, please open an issue in the aiida-core.

Copy link
Copy Markdown
Member

@AndresOrtegaGuerrero AndresOrtegaGuerrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! , I tested in the user and it worked !

@superstar54 superstar54 merged commit beabdda into aiidalab:main Feb 21, 2025
@superstar54 superstar54 deleted the fix_check_properties branch February 21, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants