mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 14:22:33 +00:00
check for None
This commit is contained in:
@@ -128,12 +128,12 @@ class Facet:
|
|||||||
templates = self.applicability_templates
|
templates = self.applicability_templates
|
||||||
elif clause_type == "requirement":
|
elif clause_type == "requirement":
|
||||||
is_prohibited = False
|
is_prohibited = False
|
||||||
if specification.maxOccurs == 0:
|
if specification and specification.maxOccurs == 0:
|
||||||
is_prohibited = not is_prohibited
|
is_prohibited = not is_prohibited
|
||||||
if requirement.cardinality == "prohibited":
|
if requirement and requirement.cardinality == "prohibited":
|
||||||
is_prohibited = not is_prohibited
|
is_prohibited = not is_prohibited
|
||||||
templates = self.prohibited_templates if is_prohibited else self.requirement_templates
|
templates = self.prohibited_templates if is_prohibited else self.requirement_templates
|
||||||
if requirement.cardinality == "optional":
|
if requirement and requirement.cardinality == "optional":
|
||||||
templates = [
|
templates = [
|
||||||
t.replace("shall", "may").replace("Shall", "May").replace("must", "may") for t in templates
|
t.replace("shall", "may").replace("Shall", "May").replace("must", "may") for t in templates
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user