Skip to content

Commit

Permalink
Merge pull request #43 from AnswerDotAI/test-updates
Browse files Browse the repository at this point in the history
Test `Table.update()`
  • Loading branch information
jph00 authored Nov 21, 2024
2 parents d038da2 + 657579b commit 9a8780f
Show file tree
Hide file tree
Showing 2 changed files with 413 additions and 0 deletions.
1 change: 1 addition & 0 deletions fastlite/kw.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def update(self:Table, updates: dict|None=None, pk_values: list|tuple|str|int|fl
updates = _process_row(updates)
if not xtra: xtra = getattr(self, 'xtra_id', {})
updates = {**updates, **kwargs, **xtra}
if not updates: return {}
if pk_values is None: pk_values = [updates[o] for o in self.pks]
self._orig_update(pk_values, updates=updates, alter=alter, conversions=conversions)
return self.get_last()
Expand Down
Loading

0 comments on commit 9a8780f

Please sign in to comment.