Skip to content

Commit dfe42d6

Browse files
committed
Fix API error when _format specified twice
1 parent 0281342 commit dfe42d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lmfdb/api/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ def apierror(msg, flash_extras=[], code=404, table=True):
316316
next_req = dict(request.args)
317317
next_req["_offset"] = offset
318318
url_args = next_req.copy()
319+
# Remove _format so that we don't specify that keyword twice
320+
url_args.pop("_format", None)
319321
query = url_for(".api_query", table=table, **next_req)
320322
offset += len(data)
321323
next_req["_offset"] = offset

0 commit comments

Comments
 (0)