Skip to content

Commit

Permalink
switch back to template clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Nov 22, 2024
1 parent 70b010d commit d638016
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions buildingmotif/dataclasses/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def _clear_library(cls, library: DBLibrary) -> None:
:type library: DBLibrary
"""
bm = get_building_motif()
bm.table_connection.delete_db_library(library.id)
#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?
Expand Down

0 comments on commit d638016

Please sign in to comment.