diff options
Diffstat (limited to 'src/ee/part')
-rw-r--r-- | src/ee/part/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ee/part/__init__.py b/src/ee/part/__init__.py index 3ce255e..c18dd02 100644 --- a/src/ee/part/__init__.py +++ b/src/ee/part/__init__.py @@ -237,6 +237,9 @@ class Part(object): def get_part_references(self) -> List[types.PartReference]: return self.xml.referencesProp.part_referenceProp + def get_only_part_reference(self) -> Optional[types.PartReference]: + return next(iter(self.get_part_references()), None) + def get_exactly_one_part_reference(self) -> types.PartReference: refs = self.get_part_references() if len(refs) == 0: |