File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ def dict( # type: ignore
273273 for field_name in getattr (self , "_relationship_properties" ):
274274 field = cast (Union [RelationshipProperty , List ], getattr (self , field_name ))
275275
276- if not isinstance (field , list ):
276+ if not isinstance (field , list ) and not ( exclude is not None and field_name in exclude ) :
277277 base_dict [field_name ] = [
278278 cast (Union [RelationshipModel , NodeModel ], node ).dict () for node in field .nodes
279279 ]
@@ -327,7 +327,7 @@ def json( # type: ignore
327327 for field_name in getattr (self , "_relationship_properties" ):
328328 field = cast (Union [RelationshipProperty , List ], getattr (self , field_name ))
329329
330- if not isinstance (field , list ):
330+ if not isinstance (field , list ) and not ( exclude is not None and field_name in exclude ) :
331331 modified_json [field_name ] = [
332332 cast (Union [RelationshipModel , NodeModel ], node ).json () for node in field .nodes
333333 ]
You can’t perform that action at this time.
0 commit comments