Fix bug where MergeDuplicateTypesByTag recipe would've left multiple IfcRelDefinesByType relationships which is no good

This commit is contained in:
Dion Moult
2022-08-03 17:33:23 +10:00
parent 0ee93294dd
commit 709c530434
5 changed files with 74 additions and 16 deletions
@@ -42,7 +42,7 @@ class Usecase:
def add_from_identification(self):
reference = self.get_existing_reference(self.settings["identification"])
if reference:
self.add_to_existing_relationship()
self.add_to_existing_relationship(reference)
else:
reference = self.file.createIfcClassificationReference(
Name=self.settings["name"], ReferencedSource=self.settings["classification"]
@@ -63,7 +63,7 @@ class Usecase:
reference = self.get_existing_reference(identification)
if reference:
self.add_to_existing_relationship()
self.add_to_existing_relationship(reference)
return reference
migrator = ifcopenshell.util.schema.Migrator()
@@ -16,8 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell.util.schema
class Usecase:
def __init__(self, file, **settings):