Add context to export URL

issue9304
review317361002
This commit is contained in:
Cédric Krier
2020-05-19 19:36:09 +02:00
parent 7521bfd8df
commit 163f99ff65
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
* Add context to export CSV route
Version 5.6.0 - 2020-05-04
* Bug fixes (see mercurial logs for details)
* Call getter function when accessing Function field on unsaved record
+9
View File
@@ -191,6 +191,15 @@ def data(request, pool, model):
request.args.get('d', '[]'), object_hook=JSONDecoder())
except json.JSONDecodeError:
abort(HTTPStatus.BAD_REQUEST)
try:
ctx = json.loads(
request.args.get('c', '{}'), object_hook=JSONDecoder())
except json.JSONDecoder:
abort(HTTPStatus.BAD_REQUEST)
for key in list(ctx.keys()):
if key.startswith('_') and key != '_datetime':
del ctx[key]
context.update(ctx)
limit = None
offset = 0
if 's' in request.args: