f476be1f by 周伟奇

fix bug

1 parent 3a34be19
...@@ -29,6 +29,12 @@ class CustomDate(fields.Date): ...@@ -29,6 +29,12 @@ class CustomDate(fields.Date):
29 return value 29 return value
30 30
31 31
32 class CustomDecimal(fields.Decimal):
33
34 def _deserialize(self, value, attr, data, **kwargs):
35 return self._to_string(self._validated(value))
36
37
32 # restframework将request.body封装至request.data, webargs从request.data中获取参数 38 # restframework将request.body封装至request.data, webargs从request.data中获取参数
33 @parser.location_loader("data") 39 @parser.location_loader("data")
34 def load_data(request, schema): 40 def load_data(request, schema):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!