diff --git a/apis_core/apis_metainfo/models.py b/apis_core/apis_metainfo/models.py index d43ac6c..89f6fc0 100644 --- a/apis_core/apis_metainfo/models.py +++ b/apis_core/apis_metainfo/models.py @@ -276,7 +276,7 @@ def merge_with(self, entities): if not isinstance(entities, list) and not isinstance(entities, QuerySet): entities = [entities] entities = [ - self_model_class.objects.get(pk=ent) if type(ent) == int else ent + self_model_class.objects.get(pk=ent) if type(ent) == int else ent # noqa: E721 for ent in entities ] rels = ContentType.objects.filter( @@ -304,7 +304,7 @@ def merge_with(self, entities): for u in Uri.objects.filter(entity=ent): u.entity = self u.save() - for l in Label.objects.filter(temp_entity=ent): + for l in Label.objects.filter(temp_entity=ent): # noqa: E741 l.temp_entity = self l.save() for r in rels.filter(model__icontains=e_b): diff --git a/apis_core/urls.py b/apis_core/urls.py index e84b6dd..03eb28f 100644 --- a/apis_core/urls.py +++ b/apis_core/urls.py @@ -8,6 +8,7 @@ from apis_core.apis_metainfo.views import beacon from apis_core.apis_vocabularies.api_views import UserViewSet from apis_core.helper_functions.ContentType import GetContentTypes +from apis_core.apis_entities.autocomplete3 import GenericEntitiesAutocomplete app_name = "apis_core" @@ -37,6 +38,11 @@ else: urlpatterns = [ path("api/", include((router.urls, "apis_core"), namespace="apis_api")), + path( + "api/entities/autocomplete-network//", + GenericEntitiesAutocomplete.as_view(), + name="network-ac", + ), path("beacon/", beacon, name="beacon"), path("labels/", include("apis_core.apis_labels.urls", namespace="apis_labels")), path("tei/", include("apis_core.apis_tei.tei_urls", namespace="apis_tei")),