feat: 日志提交和撤回返回序列化信息
This commit is contained in:
parent
94c026f23f
commit
a9c16c4a9d
|
@ -176,7 +176,7 @@ class MlogViewSet(CustomModelViewSet):
|
|||
vdata_new = MlogSerializer(ins).data
|
||||
create_auditlog('submit', ins, vdata_new,
|
||||
vdata_old, now, self.request.user)
|
||||
return Response()
|
||||
return Response(MlogSerializer(instance=ins).data)
|
||||
|
||||
@action(methods=['post'], detail=True, perms_map={'post': 'mlog.submit'}, serializer_class=MlogRevertSerializer)
|
||||
@transaction.atomic
|
||||
|
@ -197,7 +197,7 @@ class MlogViewSet(CustomModelViewSet):
|
|||
update_mtask(ins.mtask)
|
||||
create_auditlog('revert', ins, {}, {}, now, user,
|
||||
request.data.get('change_reason', ''))
|
||||
return Response()
|
||||
return Response(MlogSerializer(instance=ins).data)
|
||||
|
||||
@action(methods=['post'], detail=False, perms_map={'post': '*'}, serializer_class=MlogRelatedSerializer)
|
||||
@transaction.atomic
|
||||
|
|
Loading…
Reference in New Issue