diff options
Diffstat (limited to 'gn3/db/__init__.py')
-rw-r--r-- | gn3/db/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/db/__init__.py b/gn3/db/__init__.py index fae4d29..1eb7b12 100644 --- a/gn3/db/__init__.py +++ b/gn3/db/__init__.py @@ -36,7 +36,7 @@ def update(conn: Any, data: Dataclass, where: Dataclass) -> Optional[int]: """Run an UPDATE on a table""" - if not any(astuple(data) + astuple(where)): + if not (any(astuple(data)) and any(astuple(where))): return None sql = f"UPDATE {table} SET " sql += ", ".join(f"{TABLEMAP[table].get(k)} " |