Skip to content

Commit 15957b5

Browse files
authored
Merge pull request #40 from TirathPatel/gracefully-catch-null-error
Prevent crashing on `_convert_date`
2 parents 450159b + 8e56802 commit 15957b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

whodap/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def __getattribute__(self, item):
150150
otherwise returns the value of the given attribute
151151
"""
152152
val = super().__getattribute__(item)
153-
if item == "eventDate":
153+
if item == "eventDate" and val:
154154
return self._convert_date(val)
155155
return val
156156

0 commit comments

Comments
 (0)