File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -543,9 +543,10 @@ def add_port_accept_connection_type(
543543 connection_data = connection_data [key ]
544544
545545 if accept_ptype not in connection_data :
546- connection_data [accept_ptype ] = [accept_pname ]
546+ connection_data [accept_ptype ] = set ( [accept_pname ])
547547 else :
548- connection_data [accept_ptype ].append (accept_pname )
548+ # ensure data remains a set instead of list after json de-serialize
549+ connection_data [accept_ptype ] = set (connection_data [accept_ptype ]) | {accept_pname }
549550
550551 def port_accept_connection_types (self , node_type , port_type , port_name ):
551552 """
@@ -588,9 +589,10 @@ def add_port_reject_connection_type(
588589 connection_data = connection_data [key ]
589590
590591 if reject_ptype not in connection_data :
591- connection_data [reject_ptype ] = [reject_pname ]
592+ connection_data [reject_ptype ] = set ( [reject_pname ])
592593 else :
593- connection_data [reject_ptype ].append (reject_pname )
594+ # ensure data remains a set instead of list after json de-serialize
595+ connection_data [reject_ptype ] = set (connection_data [reject_ptype ]) | {reject_pname }
594596
595597 def port_reject_connection_types (self , node_type , port_type , port_name ):
596598 """
You can’t perform that action at this time.
0 commit comments