Skip to content

Commit 0db30f3

Browse files
committed
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
1 parent bd934d0 commit 0db30f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/api/serializer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ def json_view(self, request, filter={}, expand=[]):
231231
for k in list(qfilter.keys()):
232232
if k.startswith("_"):
233233
del qfilter[k]
234+
# discard a possible apikey, rather than using it as a queryset argument
235+
if 'apikey' in qfilter:
236+
del qfilter['apikey']
234237
qfilter.update(filter)
235238
filter = qfilter
236239
key = request.GET.get("_key", "pk")

0 commit comments

Comments
 (0)