mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-29 03:21:05 +00:00
fix: 审批时 来着不同组织的资产校验 (#8586)
Co-authored-by: feng626 <1304903146@qq.com>
This commit is contained in:
parent
af080fe38d
commit
f758414844
@ -77,7 +77,8 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
|||||||
partial = kwargs.pop('partial', False)
|
partial = kwargs.pop('partial', False)
|
||||||
instance = self.get_object()
|
instance = self.get_object()
|
||||||
serializer = self.get_serializer(instance, data=request.data, partial=partial)
|
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 = serializer.save()
|
||||||
instance.approve(processor=request.user)
|
instance.approve(processor=request.user)
|
||||||
return Response('ok')
|
return Response('ok')
|
||||||
|
Loading…
Reference in New Issue
Block a user