File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,10 +29,16 @@ class Deliverable:
2929 _meta : Metadata | None = None
3030
3131 @cached_property
32- def productid (self ) -> str :
32+ def productid (self ) -> str | None :
3333 """Return the product ID."""
3434 # ancestor::product/@productid
35- return next (self ._node .iterancestors ('product' )).attrib .get ('productid' )
35+ return self .product_node .attrib .get ('productid' , None )
36+
37+ @cached_property
38+ def productname (self ) -> str | None :
39+ """Return the product name."""
40+ # ancestor::product/name
41+ return self .product_node .findtext ('name' , default = None , namespaces = None )
3642
3743 @cached_property
3844 def docsetid (self ) -> str :
@@ -185,12 +191,6 @@ def node(self) -> etree._Element:
185191 """Return the node of the deliverable."""
186192 return self ._node
187193
188- @cached_property
189- def productname (self ) -> str :
190- """Return the product name or None if not found."""
191- # anecstor::product/name
192- return self .product_node .findtext ('name' , default = None , namespaces = None )
193-
194194 @cached_property
195195 def acronym (self ) -> str :
196196 """Return the product acronym or None if not found."""
You can’t perform that action at this time.
0 commit comments