Skip to content

Commit

Permalink
Merge pull request #46 from OpenSPP/fix-import-match
Browse files Browse the repository at this point in the history
[FIX] import matching should not remove value from importing row
  • Loading branch information
gonzalesedwin1123 authored Dec 8, 2023
2 parents 9ebb328 + 383ac61 commit 2d1ab2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spp_import_match/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ def load(self, fields, data):
item for sublist in field_to_match for item in sublist
]
for fields_pop in flat_fields_to_remove:
if fields_pop in row:
# TODO: @eMJay0921: import matching should not remove any
# value of importing row, this should be removed.
if fields_pop in row and match._fields[fields_pop].type in [
"one2many",
"many2many",
]:
row[fields_pop] = False

match.export_data(fields)
Expand Down

0 comments on commit 2d1ab2b

Please sign in to comment.