Skip to content

Commit f0dc8c5

Browse files
committed
[FIX] util/records: fix typo in dict comprehension
There was an invalid iteration over dict keys. Fix for 0cd78cb closes #250 Signed-off-by: Alvaro Fuentes Suarez (afu) <[email protected]>
1 parent 0cd78cb commit f0dc8c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/records.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ def replace_record_references_batch(cr, id_mapping, model_src, model_dst=None, r
14681468
same_ids = {k: v for k, v in id_mapping.items() if k == v}
14691469
if same_ids:
14701470
_logger.warning("Replace references in model `%s`, ignoring same-id mapping `%s`", model_src, same_ids)
1471-
id_mapping = {k: v for k, v in id_mapping if k != v}
1471+
id_mapping = {k: v for k, v in id_mapping.items() if k != v}
14721472

14731473
assert id_mapping
14741474
assert all(isinstance(v, int) and isinstance(k, int) for k, v in id_mapping.items())

0 commit comments

Comments
 (0)