Skip to content

Commit

Permalink
fixed failed updates on firestore
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Dec 9, 2024
1 parent f725019 commit 3937a08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydal/adapters/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=""):
Expand Down

0 comments on commit 3937a08

Please sign in to comment.