perf: 工单优化

pull/6924/head
feng626 2021-09-22 15:15:01 +08:00
parent da2dea5003
commit 5923562440
1 changed files with 1 additions and 4 deletions

View File

@ -15,7 +15,4 @@ class IsApplicant(permissions.BasePermission):
class IsAssignee(permissions.BasePermission):
def has_permission(self, request, view):
if view.action == 'list':
return view.ticket.has_all_assignee(request.user)
elif view.action == 'create':
return view.ticket.has_current_assignee(request.user)
return view.ticket.has_all_assignee(request.user)