Skip to content

Commit bd138f4

Browse files
committed
Added an empty arg check to pretty_date. Should probably never happen, though was getting an fatal error for what should be a minor data quality issue.
1 parent a2fc240 commit bd138f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/utilities.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def pretty_date(time=False):
142142
"""
143143
Expects a datetime in utc.
144144
"""
145+
if not time:
146+
return ''
147+
145148
now = utcnow()
146149
diff = now - time
147150
second_diff = diff.seconds

0 commit comments

Comments
 (0)