From f932034ab245932cd2c2e23bb476a93213859191 Mon Sep 17 00:00:00 2001 From: Logan Williams Date: Tue, 7 Jun 2022 13:14:48 +0200 Subject: [PATCH] Add a bit more logging --- sync_with_gsheet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sync_with_gsheet.py b/sync_with_gsheet.py index d206e48..7302510 100644 --- a/sync_with_gsheet.py +++ b/sync_with_gsheet.py @@ -15,11 +15,13 @@ def sync_channels(args, session): row = 2 for c in channels: + # defaults for unset values if c["public"] == "": - c["public"] = False + c["public"] = True if c["chat"] == "": c["chat"] = False + # normalize the values slightly from the Google Sheet for k in c.keys(): if c[k] == "TRUE" or c[k] == "yes": c[k] = True @@ -84,6 +86,8 @@ def sync_channels(args, session): # this likely means that the channel was duplicated in the Google Sheet, so add a red highlight if was_researcher: + logger.warning(f"This channel (ID {channel.id}) is possibly a duplicate.") + wks.format(f"A{str(row)}:A{str(row)}", { "backgroundColor": { "red": 1.0,