Skip to content

Commit

Permalink
Fix remove key/values
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Oct 11, 2024
1 parent 1d80a30 commit 62cb4ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scout/adapter/mongo/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,12 @@ def apply_pending(self, panel_obj: dict, version: float) -> str:
continue

if action == "edit":
gene["info"] = current_update["info"]
LOG.warning(gene)
# reset all fields except hgnc and symbol:
for key in EXPORT_PANEL_FIELDS[2:]:
gene.pop(key[1], None)
# And update keys with the pending changes
for key, value in current_update["info"].items():
gene[key] = value
new_genes.append(gene)

new_panel["genes"] = new_genes
Expand Down

0 comments on commit 62cb4ce

Please sign in to comment.