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

@ -96,7 +96,10 @@ HELPDESK_PUBLIC_TICKET_FORM_CLASS = getattr(
# can be True/False or a callable accepting the active user and returning True if they must be considered helpdesk staff
HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE = getattr(settings, 'HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE', False)
if not (HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE in (True, False) or callable(HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE)):
warnings.warn("HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE should be set to either True/False or a callable.", RuntimeWarning)
warnings.warn(
"HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE should be set to either True/False or a callable.",
RuntimeWarning
)
# show edit buttons in ticket follow ups.
HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP = getattr(settings,