aboutsummaryrefslogtreecommitdiffstats
path: root/hommaexceli_py/sheets_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'hommaexceli_py/sheets_client.py')
-rw-r--r--hommaexceli_py/sheets_client.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/hommaexceli_py/sheets_client.py b/hommaexceli_py/sheets_client.py
index 242dca8..36dabb2 100644
--- a/hommaexceli_py/sheets_client.py
+++ b/hommaexceli_py/sheets_client.py
@@ -89,16 +89,13 @@ def fetch_sheet_data(service: Resource) -> list[SheetsRow]:
return [_row_to_dataclass(row) for row in rows]
-def update_sheet_last_done_column(
- service: Resource, processed_rows: list[ProcessedRow]
-):
+def update_sheet_last_done_column(service: Resource, new_datestamps: list[str]):
logging.info("Calling Sheets API to update last done column...")
range = getenv("SHEETS_RANGE")
sheet = service.spreadsheets()
last_done_column_range = _get_rightmost_column_in_range(range)
- # Update last done date to match next date
- body = {"values": list(map(lambda row: [row.next_datestamp], processed_rows))}
+ body = {"values": [[datestamp] for datestamp in new_datestamps]}
sheet.values().update(
spreadsheetId=getenv("SHEETS_SPREADSHEET_ID"),