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