fix: no record bug

This commit is contained in:
caoqianming 2023-06-01 14:03:12 +08:00
parent a7d2c4f8c4
commit 2595a51390
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ class Task2DoViewSet(ListModelMixin, GenericViewSet):
field = request.data.get('key')
theattr = getattr(obj, field, None)
if theattr is None:
theattr = 0
setattr(obj, field, 0)
if field == 'num_complaint':
obj.num_complaint_10 = 0
elif field == 'num_pt':