fix: 初始化检测录入bug
This commit is contained in:
parent
ae84f6b6c9
commit
066217d6c1
|
@ -79,7 +79,7 @@ class SfLogViewSet(UpdateModelMixin, ListModelMixin, DestroyModelMixin, CustomGe
|
|||
testitem = TestItem.objects.get(id=tid)
|
||||
end_time_local = localtime(obj.end_time)
|
||||
params = {'type': 'sflog', 'material': material, 'testitem': testitem}
|
||||
params_default = params.update({'year_s': end_time_local.year, 'month': end_time_local.month, 'day': end_time_local.day})
|
||||
params_default = params.update({'year_s': end_time_local.year, 'month_s': end_time_local.month, 'day_s': end_time_local.day})
|
||||
QuaStat.objects.get_or_create(**params, defaults=params_default)
|
||||
qs = QuaStat.objects.filter(type='sflog', sflog=obj)
|
||||
sr = QuaStatSerializer(instance=qs, many=True)
|
||||
|
|
Loading…
Reference in New Issue