From 3937a086e1377623572c161f08fa4fe4f155ddc4 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sun, 8 Dec 2024 20:03:01 -0800 Subject: [PATCH] fixed failed updates on firestore --- pydal/adapters/google.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pydal/adapters/google.py b/pydal/adapters/google.py index 5ff90b47e..1a87fda76 100644 --- a/pydal/adapters/google.py +++ b/pydal/adapters/google.py @@ -325,8 +325,10 @@ def update(self, table, query, update_fields): for doc in docs: batch.update(doc.reference, {f.name: v for f, v in update_fields}) counter += 1 - if counter: + try: batch.commit() + except Exception: + pass # google.api_core.exceptions.NotFound: No document to update return counter def truncate(self, table, mode=""):