From f4672aad8c0e38eb3853a9a7b1453770b21f9e07 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 14 Oct 2023 04:58:50 +1100 Subject: [PATCH] Don't make sheet name an input column, go back to special casing it on row create This means it won't update if put in the wrong place, but avoids issues with reverse sync trying to write it out when it's not an actual column --- sheetsync/sheetsync/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sheetsync/sheetsync/main.py b/sheetsync/sheetsync/main.py index fb376aa..5820135 100644 --- a/sheetsync/sheetsync/main.py +++ b/sheetsync/sheetsync/main.py @@ -77,7 +77,6 @@ class SheetSync(object): self.create_missing_ids = False # List of input columns self.input_columns = [ - 'sheet_name', 'event_start', 'event_end', 'category', @@ -182,7 +181,7 @@ class SheetSync(object): logging.info("Inserting new event {}".format(row['id'])) # Insertion conflict just means that another sheet sync beat us to the insert. # We can ignore it. - insert_cols = ['id'] + self.input_columns + insert_cols = ['id', 'sheet_name'] + self.input_columns built_query = sql.SQL(""" INSERT INTO events ({}) VALUES ({})