Skip to content

Commit

Permalink
Fix the bug of mismatched data types in the diff within the update me…
Browse files Browse the repository at this point in the history
…chanism.
  • Loading branch information
jieguangzhou committed Jan 7, 2025
1 parent fbbb9dc commit 5880156
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

**Before you create a Pull Request, remember to update the Changelog with your changes.**

## Changes Since Last Release
## Changes Since Last Release

#### Changed defaults / behaviours

Expand Down Expand Up @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix minor bug in openai plugin init method
- Fix the frontend rendering issue related to choices when it is set to /describe_tables.
- Fix the error when using batch apply with dataset.
- Fix the bug of mismatched data types in the diff within the update mechanism.

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

Expand Down
4 changes: 4 additions & 0 deletions superduper/base/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def run(self, name, data):

def _diff(r1, r2, d):
for k in r1:
if not isinstance(r1[k], type(r2[k])):
d[k] = r2[k]
continue

if isinstance(r1[k], dict):
if r1[k].keys() != r2[k].keys():
d[k] = r2[k]
Expand Down

0 comments on commit 5880156

Please sign in to comment.