Skip to content
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

Serialization of graph fails if there are accepted_connection_types/rejected_connection_types defined #434

Open
claudio-alvaro-wbgames opened this issue Oct 2, 2024 · 1 comment

Comments

@claudio-alvaro-wbgames
Copy link

Python's json doesn't serialize set objects. I unfortunately can't submit a PR but the fix is relatively simple, in case anyone else encounters this issue.

line 553 of NodeGraphQt/base/model.py:

        if accept_ptype not in connection_data:
            connection_data[accept_ptype] = [accept_pname]
        else:
            # ensure data remains a set instead of list after json de-serialize
            connection_data[accept_ptype] = list(set(connection_data[accept_ptype]) | {accept_pname})
jchanvfx added a commit that referenced this issue Oct 6, 2024
jchanvfx added a commit that referenced this issue Oct 6, 2024
@jchanvfx
Copy link
Owner

jchanvfx commented Oct 6, 2024

@claudio-alvaro-wbgames Thanks for pointing out this issue I'll make some tweaks.

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

No branches or pull requests

2 participants