mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
String Check, replace Nonetype with empty string
This commit is contained in:
parent
1271f00278
commit
9e3466a069
@ -30,5 +30,6 @@ def datetime_string_format(value):
|
||||
try:
|
||||
new_value = date_filter(datetime.strptime(value, CUSTOMFIELD_TIME_FORMAT), settings.TIME_FORMAT)
|
||||
except (TypeError, ValueError):
|
||||
new_value = value
|
||||
# If NoneType return empty string, else return original value
|
||||
new_value = "" if value is None else value
|
||||
return new_value
|
||||
|
Loading…
Reference in New Issue
Block a user