chore(pep8): Fix bad imports, unused variables, pep8 warnings and some possible bugs

This commit is contained in:
Arkadiy Korotaev
2021-03-05 09:27:23 +01:00
parent 406207ff74
commit c90811418a
14 changed files with 64 additions and 39 deletions

View File

@ -67,7 +67,11 @@ class HelpdeskUser:
if self.has_full_access():
return True
else:
return helpdesk_settings.HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION and self.user.has_perm(queue.permission_name)
return (
helpdesk_settings.HELPDESK_ENABLE_PER_QUEUE_STAFF_PERMISSION
and
self.user.has_perm(queue.permission_name)
)
def can_access_ticket(self, ticket):
"""Check to see if the user has permission to access