From 82ac2aa7628e83c01f776864d88c218f388a6516 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 18 Apr 2016 22:38:33 +0200 Subject: set the default value of the parse with the values from the request. --- src/web/views/api/v2/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/web/views/api/v2/common.py') diff --git a/src/web/views/api/v2/common.py b/src/web/views/api/v2/common.py index 0d5d8090..0227d6cf 100644 --- a/src/web/views/api/v2/common.py +++ b/src/web/views/api/v2/common.py @@ -100,8 +100,9 @@ class PyAggAbstractResource(Resource): if not default and attr_name not in in_values: continue else: - parser.add_argument(attr_name, location='json', **attr) - return parser.parse_args(req=req, strict=strict) + parser.add_argument(attr_name, location='json', + default=in_values[attr_name]) + return parser.parse_args(req=request.args, strict=strict) class PyAggResourceNew(PyAggAbstractResource): -- cgit