This commit is contained in:
Andrej730
2024-04-12 10:42:15 +05:00
parent e56aa45a82
commit 59b496d4b5
10 changed files with 31 additions and 16 deletions
@@ -21,7 +21,7 @@ import ifcopenshell.util.element
class Usecase:
def __init__(self, file, reference=None):
def __init__(self, file: ifcopenshell.file, reference: ifcopenshell.entity_instance):
"""Remove a document reference
All associations with objects are removed.
@@ -42,7 +42,7 @@ class Usecase:
self.file = file
self.settings = {"reference": reference}
def execute(self):
def execute(self) -> None:
for rel in self.settings["reference"].DocumentRefForObjects or []:
history = rel.OwnerHistory
self.file.remove(rel)