Skip to content

Commit 1de90b0

Browse files
author
Jens Kürten
committed
fix: link_objects function to handle individual BaseObject fields, not only lists
1 parent f20c327 commit 1de90b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csfunctions/handler.py

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def link_objects(event: Event):
7777
# the list might contain entries that are not objects, so we check first
7878
if isinstance(obj, BaseObject):
7979
obj.link_objects(data)
80+
elif isinstance(field, BaseObject):
81+
# if the field is not a list, we check if it is an object and link it
82+
field.link_objects(data)
83+
# if the field is not a list or an object, we ignore it
8084

8185

8286
def execute(function_name: str, request_body: str, function_dir: str = "src") -> str:

0 commit comments

Comments
 (0)