From 3221ede6e709fc680e1bebebcfc334cc46e889ca Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 15 Oct 2021 17:54:03 +0200 Subject: Syndication - initialize type match with a source --- ishtar_common/rest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ishtar_common/rest.py') diff --git a/ishtar_common/rest.py b/ishtar_common/rest.py index 602bba293..0ae951dd1 100644 --- a/ishtar_common/rest.py +++ b/ishtar_common/rest.py @@ -1,3 +1,5 @@ +import json + from django.conf import settings from django.db.models import Q from django.utils.translation import activate, deactivate @@ -94,9 +96,11 @@ class FacetAPIView(APIView): search_keys.append(str(search_key).lower()) deactivate() values[ct_model].append( - [search_keys, values_ct] + [f"{type.model._meta.app_label}.{type.model._meta.model_name}", + search_keys, values_ct] ) - return Response(values) + #values = json.dumps(values) + return Response(values, content_type="json") def _get_base_search_model_queries(self): """ -- cgit v1.2.3