Skip to content

Commit b47cf69

Browse files
author
Jens Kürten
committed
Merge branch 'main' of github.com:cslab/functions-sdk-python into run-workflow-action
2 parents 371c20b + c88ded8 commit b47cf69

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

csfunctions/handler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def link_objects(event: Event):
6868
# e.g. all parts would be in Event.data.parts = list[Part]
6969

7070
for field_name in data.model_fields_set:
71-
# go through each field in data and look for fields that are lists
72-
# objects will always be passed in a list
71+
# go through each field in data and look for fields that are lists of BaseObjects
72+
# or direct BaseObjects
7373

7474
field = getattr(data, field_name)
7575
if isinstance(field, list):
@@ -78,9 +78,7 @@ def link_objects(event: Event):
7878
if isinstance(obj, BaseObject):
7979
obj.link_objects(data)
8080
elif isinstance(field, BaseObject):
81-
# if the field is not a list, we check if it is an object and link it
8281
field.link_objects(data)
83-
# if the field is not a list or an object, we ignore it
8482

8583

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

docs/release_notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### Version 0.13.1:
2+
- Fix: Status Changed Events did not correctly link Engineering Changes.
3+
14
### Version 0.13.0:
25
- Feature: Added status change events for engineering changes
36

0 commit comments

Comments
 (0)