We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 600192f commit b5d2710Copy full SHA for b5d2710
csfunctions/objects/engineering_change.py
@@ -3,6 +3,8 @@
3
4
from pydantic import Field
5
6
+from csfunctions.util import get_items_of_type
7
+
8
from .base import BaseObject, ObjectType
9
from .document import Document
10
from .part import Part
@@ -57,8 +59,11 @@ class EngineeringChange(BaseObject):
57
59
cdb_mdate: datetime | None = Field(None, description="Last Modified on")
58
60
61
def link_objects(self, data: "EventData"):
- parts = getattr(data, "parts", None)
- documents = getattr(data, "documents", None)
62
+ from .document import Document
63
+ from .part import Part
64
65
+ parts = get_items_of_type(data, Part)
66
+ documents = get_items_of_type(data, Document)
67
68
if parts and self.part_ids:
69
self._link_parts(parts)
0 commit comments