feat: 可根据work_start_time 推出handle_date
This commit is contained in:
parent
a8ed1c3083
commit
d9326bc264
|
@ -686,10 +686,10 @@ class MlogChangeSerializer(CustomModelSerializer):
|
||||||
model = Mlog
|
model = Mlog
|
||||||
fields = ['id', 'work_end_time', 'handle_user', 'note', 'oinfo_json', 'test_file', 'test_user', 'test_time', 'equipment', "team"]
|
fields = ['id', 'work_end_time', 'handle_user', 'note', 'oinfo_json', 'test_file', 'test_user', 'test_time', 'equipment', "team"]
|
||||||
|
|
||||||
def validate(self, attrs):
|
# def validate(self, attrs):
|
||||||
if attrs.get('work_end_time', None):
|
# if attrs.get('work_end_time', None):
|
||||||
attrs['handle_date'] = localdate(attrs['work_end_time'])
|
# attrs['handle_date'] = localdate(attrs['work_end_time'])
|
||||||
return attrs
|
# return attrs
|
||||||
|
|
||||||
|
|
||||||
class CountJsonSerializer(serializers.Serializer):
|
class CountJsonSerializer(serializers.Serializer):
|
||||||
|
|
Loading…
Reference in New Issue