Browse Source

pyramid: default value of data_json must be a dict

Bastien Sevajol 6 years ago
parent
commit
24bfa1cfcb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hapic/ext/pyramid/context.py

+ 1 - 1
hapic/ext/pyramid/context.py View File

33
             json_body = req.json_body
33
             json_body = req.json_body
34
             # TODO : raise exception if not correct , return 400 if uncorrect instead ?
34
             # TODO : raise exception if not correct , return 400 if uncorrect instead ?
35
         else:
35
         else:
36
-            json_body = None
36
+            json_body = {}
37
 
37
 
38
         return RequestParameters(
38
         return RequestParameters(
39
             path_parameters=req.matchdict,
39
             path_parameters=req.matchdict,