Skip to content

Commit d0ea777

Browse files
committed
fix: Guard against passing None value to validate_rfc3339
1 parent 80e42b8 commit d0ea777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cove_ocds/templatetags/cove_ocds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ def html_error_msg_ocds(error):
3838

3939
@register.filter
4040
def to_datetime(value):
41-
if validate_rfc3339(value):
41+
if value and validate_rfc3339(value):
4242
return parser.parse(value)
4343
return None

0 commit comments

Comments
 (0)