Skip to content

Commit

Permalink
fix exception
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Jan 21, 2025
1 parent b102493 commit fda83d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildingmotif/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from rdflib.compare import _TripleCanonicalizer
from rdflib.paths import ZeroOrOne
from rdflib.term import Node
from sqlalchemy.exc import NoResultFound

from buildingmotif.database.errors import LibraryNotFound
from buildingmotif.namespaces import OWL, PARAM, RDF, SH, XSD, bind_prefixes

if TYPE_CHECKING:
Expand Down Expand Up @@ -63,7 +63,7 @@ def _guarantee_unique_template_name(library: "Library", name: str) -> str:
while library.get_template_by_name(name):
name = f"{original_name}_{idx}"
idx += 1
except NoResultFound:
except LibraryNotFound:
# this means that the template does not exist and we can use the original name
pass
return name
Expand Down

0 comments on commit fda83d3

Please sign in to comment.