diff --git a/src/linkahead/utils/get_entity.py b/src/linkahead/utils/get_entity.py index 9fee45826b46c5a5ec9ca8c1e0bec134f5d7ce77..282f7c86e10571d0e0d62b93da7f61bba5205cba 100644 --- a/src/linkahead/utils/get_entity.py +++ b/src/linkahead/utils/get_entity.py @@ -24,7 +24,7 @@ from typing import Union from ..common.models import Entity, execute_query -from .escape import escape_quoted_text +from .escape import escape_squoted_text def get_entity_by_name(name: str) -> Entity: @@ -32,7 +32,7 @@ def get_entity_by_name(name: str) -> Entity: Submits the query "FIND ENTITY WITH name='{name}'". """ - name = escape_quoted_text(name) + name = escape_squoted_text(name) return execute_query(f"FIND ENTITY WITH name='{name}'", unique=True) diff --git a/unittests/test_utils.py b/unittests/test_utils.py index 9cfa50f7060212111d116930b9a19f6a09681052..e7495a91d5a0d525278fa608777e6c697ac54e99 100644 --- a/unittests/test_utils.py +++ b/unittests/test_utils.py @@ -25,8 +25,7 @@ from __future__ import unicode_literals from linkahead.common.utils import xml2str -from linkahead.utils.escape import (escape_dquoted_text, escape_quoted_text, - escape_squoted_text) +from linkahead.utils.escape import (escape_dquoted_text, escape_squoted_text) from lxml.etree import Element