From 430938dc4962fee26505bec9798b7f6f250eefb1 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 14 Oct 2023 03:25:58 +1100 Subject: [PATCH] error is always a string, it just might be empty --- sheetsync/sheetsync/streamlog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sheetsync/sheetsync/streamlog.py b/sheetsync/sheetsync/streamlog.py index 55814b0..c0f6bec 100644 --- a/sheetsync/sheetsync/streamlog.py +++ b/sheetsync/sheetsync/streamlog.py @@ -67,11 +67,13 @@ class StreamLogMiddleware: 'event_end': lambda v: parse_utc_only(v["time"]) if v["type"] == "Time" else None, 'category': lambda v: v["name"], 'state': lambda v: None if v is None else v.upper(), + 'error': lambda v: None if v == '' else v, } # Maps DB column names to an encode function to convert from internal format to streamlog. # Omitted columns act as the identity function. self.column_encode = { 'state': lambda v: v[0].upper() + v[1:].lower(), # Titlecase + 'error': lambda v: '' if v == None else v, } # Maps DB column names to the url part you need to write to to set it. self.write_map = {