From e444e82e90c24a7ac72854ec281094ce029f1af4 Mon Sep 17 00:00:00 2001 From: Gabe Fierro Date: Fri, 22 Nov 2024 09:46:20 -0700 Subject: [PATCH] commit delete library on overwrite --- buildingmotif/dataclasses/library.py | 1 + 1 file changed, 1 insertion(+) diff --git a/buildingmotif/dataclasses/library.py b/buildingmotif/dataclasses/library.py index 481f8465..c3994258 100644 --- a/buildingmotif/dataclasses/library.py +++ b/buildingmotif/dataclasses/library.py @@ -132,6 +132,7 @@ def _clear_library(cls, library: DBLibrary) -> None: bm = get_building_motif() for template in library.templates: # type: ignore bm.session.delete(template) + bm.session.commit() # TODO: load library from URI? Does the URI identify the library uniquely? # TODO: can we deduplicate shape graphs? use hash of graph?