Skip to content

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

@claudio-alvaro-wbgames

Description

@claudio-alvaro-wbgames

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})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions