diff options
author | 2018-06-24 10:44:46 +0100 | |
---|---|---|
committer | 2018-06-24 10:44:46 +0100 | |
commit | 3dfbe79936965e9a4ef5eba634dff87009581192 (patch) | |
tree | 838f0d96a57e450091dcd5899d61e45d78ab3ae9 /pysite/decorators.py | |
parent | [API] Check for DB-nuking empty data in users POST (diff) |
[API] Implement chunk-based user update mechanism
Diffstat (limited to 'pysite/decorators.py')
-rw-r--r-- | pysite/decorators.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pysite/decorators.py b/pysite/decorators.py index 1d840ac7..de914c6f 100644 --- a/pysite/decorators.py +++ b/pysite/decorators.py @@ -65,7 +65,7 @@ def api_key(f): def api_params( - schema: Schema, + schema: Schema = None, validation_type: ValidationTypes = ValidationTypes.json, allow_duplicate_params: bool = False): """ @@ -133,6 +133,8 @@ def api_params( if len(value) > 1: raise BadRequest("This view does not allow duplicate query arguments") data = request.args.to_dict() + elif validation_type == ValidationTypes.none: + return f(self, None, *args, **kwargs) else: raise ValueError(f"Unknown validation type: {validation_type}") # pragma: no cover |