fix: mtask day 逻辑不严谨

This commit is contained in:
caoqianming 2023-10-26 11:34:31 +08:00
parent ef971c6501
commit c459960128
1 changed files with 2 additions and 0 deletions

View File

@ -109,6 +109,8 @@ class MtaskViewSet(CustomModelViewSet):
data = MtaskSerializer(instance=mtasks, many=True).data
res_data = []
len_data = len(data)
if len_data == 1:
return Response(data)
for ind, val in enumerate(data):
if val['utask'] is None:
res_data.append(val)