Skip to content

Commit

Permalink
Merge branch 'master' into issue#1274
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak authored Jul 26, 2023
2 parents f589193 + 025505f commit a066790
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion care/facility/templatetags/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ def field_name_to_label(value):

@register.filter(expects_localtime=True)
def parse_datetime(value):
return datetime.strptime(value, "%Y-%m-%dT%H:%M")
try:
return datetime.strptime(value, "%Y-%m-%dT%H:%M")
except ValueError:
return None

0 comments on commit a066790

Please sign in to comment.