summaryrefslogtreecommitdiff
path: root/ishtar_common/rest.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-15 17:54:03 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:20:59 +0100
commit3221ede6e709fc680e1bebebcfc334cc46e889ca (patch)
tree88ad3ba1c0bc80e648cf994794652a0bb53673f1 /ishtar_common/rest.py
parent6fc6efad0ee57e430903b0d24c6e925652ff3714 (diff)
downloadIshtar-3221ede6e709fc680e1bebebcfc334cc46e889ca.tar.bz2
Ishtar-3221ede6e709fc680e1bebebcfc334cc46e889ca.zip
Syndication - initialize type match with a source
Diffstat (limited to 'ishtar_common/rest.py')
-rw-r--r--ishtar_common/rest.py8
1 files changed, 6 insertions, 2 deletions
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):
"""