Skip to content

Commit

Permalink
Merge pull request #340 from ForgeFlow/master-minor-fix-merge
Browse files Browse the repository at this point in the history
[FIX] merge_records: assure don't break on method="orm" if KeyError on model
  • Loading branch information
pedrobaeza authored Jul 17, 2023
2 parents 66c1f84 + b63812a commit fb09131
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openupgradelib/openupgrade_merge_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ def _change_generic(
model = env[model_to_replace].with_context(active_test=False)
table = model._table
except KeyError:
if method == "orm":
continue
table = get_model2table(model_to_replace)
if (table, res_id_column) in exclude_columns:
continue
Expand Down

0 comments on commit fb09131

Please sign in to comment.