diff options
author | Frederick Muriuki Muriithi | 2023-08-02 06:35:37 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-08-02 06:44:33 +0300 |
commit | 47c74f8ad6e76c4227ba1ff980d3a49f9ef79a81 (patch) | |
tree | 47136d51484446218960f7a5301ecb2f17d0e593 /api_readme.md | |
parent | 9f62caa68b541d683b2a744af19c0ad4c6d0d206 (diff) | |
download | genenetwork2-47c74f8ad6e76c4227ba1ff980d3a49f9ef79a81.tar.gz |
Fix Bug: Unchanged Values Were Being Deleted
The original code (using the homebrew ORM system) would simply ignore
values that were `None` when doing updates - the new code using direct
queries was not.
My (fredmanglis) initial fix to provide a default for values in DB
that did not accept NULL was incorrect; instead, I needed to remove
any key-value pairs from the incoming data that were set to `None` to
fix the bug.
The fix still feels incorrect: maybe we should do direct comparisons
for all old-new value pairs, and set the data to be updated based on
the differences, rather than relying on `None`s.
Diffstat (limited to 'api_readme.md')
0 files changed, 0 insertions, 0 deletions