mirror of https://github.com/jumpserver/jumpserver
fix: 解决具有超级工单权限的用户无法给指定人申请工单问题 (#10597)
parent
c7ea62488d
commit
aa52dd51b1
|
@ -64,7 +64,6 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
|||
|
||||
def perform_create(self, serializer):
|
||||
instance = serializer.save()
|
||||
instance.applicant = self.request.user
|
||||
instance.save(update_fields=['applicant'])
|
||||
instance.open()
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ class TicketApplySerializer(TicketSerializer):
|
|||
org_id = serializers.CharField(
|
||||
required=True, max_length=36, allow_blank=True, label=_("Organization")
|
||||
)
|
||||
applicant = serializers.CharField(required=False, allow_blank=True)
|
||||
|
||||
def get_applicant(self, applicant_id):
|
||||
current_user = self.context['request'].user
|
||||
|
|
Loading…
Reference in New Issue