Skip to content

Commit 84a0a4d

Browse files
committed
Fix the update method in the KeyedDatabackend class
1 parent 39f7f55 commit 84a0a4d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7070
- Fix job execution
7171
- Fix performance issues in batch table creation for Snowflake.
7272
- Fix the issue related to services.
73+
- Fix the update method in the KeyedDatabackend class
7374

7475
## [0.5.0](https://github.com/superduper-io/superduper/compare/0.5.0...0.4.0]) (2024-Nov-02)
7576

superduper/backends/base/data_backend.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,10 @@ def update(self, table, condition, key, value):
619619

620620
if not r_table['is_component']:
621621
pid = self.primary_id(table)
622-
docs = self.get_many(table, condition[pid])
622+
if pid in condition:
623+
docs = self.get_many(table, condition[pid])
624+
else:
625+
docs = self.get_many(table, '*')
623626
docs = self._do_filter(docs, condition)
624627
for s in docs:
625628
s[key] = value

0 commit comments

Comments
 (0)