Fix properties in HasProcess#1180
Conversation
The input `properties` is a orm.List, and we return the raw list value for safety.
|
Hi @AndresOrtegaGuerrero , could you plase test importing the data again? |
|
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. 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)> |
| # 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 [] | ||
| ) |
There was a problem hiding this comment.
How/when/why does this conversion occur?
There was a problem hiding this comment.
I guess different aiida-core versions are used, but this could be a bug in aiida-core.
@AndresOrtegaGuerrero may provide more details.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Hi @AndresOrtegaGuerrero , yes, please open an issue in the aiida-core.
AndresOrtegaGuerrero
left a comment
There was a problem hiding this comment.
LGTM! , I tested in the user and it worked !
Fix issue reported by @AndresOrtegaGuerrero in this comment
The input
propertiesis a orm.List, and we return the raw list value for safety.