fix(rules): fill blank plan cells from matching explicit rules

This commit is contained in:
阿白叔 committed 2026-10-19 15:12:09 +08:00
1 parent cf671a1d3f
commit 27dec68fc2
2 files changed
+37

No files matched your search

@@ -91,6 +91,10 @@ def _propagate(store, task_id, before, after):
changes['sync_nc'] = rule.sync_nc
if not row.custom_value_enabled and not row.custom_value:
changes.update(custom_value_enabled=rule.custom_value_enabled, custom_value=rule.custom_value)
if (not changes.get('target_cell', row.target_cell)
and changes.get('new_part_number', row.new_part_number) == rule.new_part_number):
# Saved BOM/manual mappings can predate their explicit rule Cell.
changes['target_cell'] = rule.target_cell
updated.append(replace(row, **changes))
if tuple(updated) != rows:
store.replace_target_plan(task_id, updated)