Updated the API v2 JsonExporMixin to not try to use an API key argument as a queryset argument when building the json response.

- Legacy-Id: 17631
This commit is contained in:
Henrik Levkowetz 2020-04-15 12:01:52 +00:00
parent bd934d0f2d
commit 0db30f3ca8

View file

@ -231,6 +231,9 @@ class JsonExportMixin(object):
for k in list(qfilter.keys()):
if k.startswith("_"):
del qfilter[k]
# discard a possible apikey, rather than using it as a queryset argument
if 'apikey' in qfilter:
del qfilter['apikey']
qfilter.update(filter)
filter = qfilter
key = request.GET.get("_key", "pk")