diff --git a/helpdesk/lib.py b/helpdesk/lib.py index d265963b..ac0d46bc 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -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 diff --git a/helpdesk/templated_email.py b/helpdesk/templated_email.py index 5c98cdc7..e68489a9 100644 --- a/helpdesk/templated_email.py +++ b/helpdesk/templated_email.py @@ -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,