-
Notifications
You must be signed in to change notification settings - Fork 317
Accept/Reject ports grows each time session is loaded + saved #425
Description
If a session is loaded that has an accept_port_types or reject_port_types field, when the json file is de-serialized, what should be a set internally becomes a list.
Loading a saving the same file multiple times results in the list of port names to grow with repeated names.
Serialization was fixed in #358, but then #364 the NodeGraphModel add_port_accept/reject_connection_type() methods were changed to store the port names as a list instead of a set. The corresponding methods on NodeModel remain using sets however.
This causes some undesirable behavior where the list of port types can include repeated values.
Internally, I think the port accept/reject names should remain a set, and de-serialization should handle converting from the list that json.load() returns, into a python set()