mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
1fda4806d4
commit
234230e595
6 changed files with 69 additions and 60 deletions
|
|
@ -44,10 +44,10 @@ def json_renderer(args, data, view_name):
|
|||
data["rows"] = [remove_infinites(row) for row in data["rows"]]
|
||||
|
||||
# Deal with the _shape option
|
||||
shape = args.get("_shape", "arrays")
|
||||
shape = args.get("_shape", "objects")
|
||||
# if there's an error, ignore the shape entirely
|
||||
if data.get("error"):
|
||||
shape = "arrays"
|
||||
shape = "objects"
|
||||
|
||||
next_url = data.get("next_url")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue