diff --git a/linkml_runtime/utils/namespaces.py b/linkml_runtime/utils/namespaces.py index af88cf6c..aa3871ac 100644 --- a/linkml_runtime/utils/namespaces.py +++ b/linkml_runtime/utils/namespaces.py @@ -185,7 +185,7 @@ def uri_for(self, uri_or_curie: Any) -> URIRef: def uri_or_curie_for(self, prefix: Union[str, URIRef], suffix: str) -> str: """ Return a CURIE for prefix/suffix in possible, else a URI """ - if isinstance(prefix, URIRef) or ':/' in prefix: + if isinstance(prefix, URIRef) or ':/' in str(prefix): prefix_as_uri = str(prefix) for k, v in self.items(): if not k.startswith('@') and prefix_as_uri == str(v):