diff --git a/buildingmotif/dataclasses/library.py b/buildingmotif/dataclasses/library.py index c3994258..73c678f7 100644 --- a/buildingmotif/dataclasses/library.py +++ b/buildingmotif/dataclasses/library.py @@ -130,9 +130,10 @@ def _clear_library(cls, library: DBLibrary) -> None: :type library: DBLibrary """ bm = get_building_motif() - for template in library.templates: # type: ignore - bm.session.delete(template) - bm.session.commit() + bm.table_connection.delete_db_library(library.id) + #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?