mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 15:33:09 +01:00
Fix flake8 issues
This commit is contained in:
parent
276af1c03c
commit
104a849d9f
@ -186,11 +186,11 @@ def format_time_spent(time_spent):
|
||||
|
||||
def convert_value(value):
|
||||
""" Convert date/time data type to known fixed format string """
|
||||
if type(value) == datetime:
|
||||
if type(value) is datetime:
|
||||
return value.strftime(CUSTOMFIELD_DATETIME_FORMAT)
|
||||
elif type(value) == date:
|
||||
elif type(value) is date:
|
||||
return value.strftime(CUSTOMFIELD_DATE_FORMAT)
|
||||
elif type(value) == time:
|
||||
elif type(value) is time:
|
||||
return value.strftime(CUSTOMFIELD_TIME_FORMAT)
|
||||
else:
|
||||
return value
|
||||
|
@ -97,7 +97,7 @@ def send_templated_mail(template_name,
|
||||
if isinstance(recipients, str):
|
||||
if recipients.find(','):
|
||||
recipients = recipients.split(',')
|
||||
elif type(recipients) != list:
|
||||
elif type(recipients) is not list:
|
||||
recipients = [recipients]
|
||||
|
||||
msg = EmailMultiAlternatives(subject_part, text_part,
|
||||
|
Loading…
Reference in New Issue
Block a user