External resource relationships are now also purged when removing classifications

This commit is contained in:
Dion Moult
2022-09-05 16:51:42 +10:00
parent d1baaa21e7
commit 72544419da
2 changed files with 65 additions and 0 deletions
@@ -32,6 +32,9 @@ class Usecase:
for rel in self.file.by_type("IfcRelAssociatesClassification"):
if not rel.RelatingClassification:
self.file.remove(rel)
for rel in self.file.by_type("IfcExternalReferenceRelationship"):
if not rel.RelatingReference:
self.file.remove(rel)
def get_references(self, classification):
results = []