fix bug
Showing
1 changed file
with
6 additions
and
0 deletions
... | @@ -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): | ... | ... |
-
Please register or sign in to post a comment