Skip to content

Commit

Permalink
Fix for possibly None metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Jul 12, 2023
1 parent 8f8bbdc commit f16b8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion akernel/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


def date_to_str(obj: Dict[str, Any]):
if "date" in obj and type(obj["date"]) != str:
if obj is not None and "date" in obj and type(obj["date"]) != str:
obj["date"] = obj["date"].isoformat().replace("+00:00", "Z")
return obj

Expand Down

0 comments on commit f16b8c6

Please sign in to comment.