Browse Source

fix: 审批时 来着不同组织的资产校验 (#8586)

Co-authored-by: feng626 <1304903146@qq.com>
pull/8588/head
fit2bot 2 years ago committed by GitHub
parent
commit
f758414844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      apps/tickets/api/ticket.py

3
apps/tickets/api/ticket.py

@ -77,7 +77,8 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
partial = kwargs.pop('partial', False)
instance = self.get_object()
serializer = self.get_serializer(instance, data=request.data, partial=partial)
serializer.is_valid(raise_exception=True)
with tmp_to_root_org():
serializer.is_valid(raise_exception=True)
instance = serializer.save()
instance.approve(processor=request.user)
return Response('ok')

Loading…
Cancel
Save