Skip to content

Honor foreign_keys argument in merge_references() - #828

Open
00200200 wants to merge 2 commits into
kvesteri:masterfrom
00200200:fix/merge-references-foreign-keys
Open

00200200 wants to merge 2 commits into
kvesteri:masterfrom
00200200:fix/merge-references-foreign-keys

Conversation

@00200200

@00200200 00200200 commented Sep 17, 2026 •

Copy link
Copy Markdown

Closes #775

merge_references() always overwrote the foreign_keys argument, so you couldn't limit which FKs got rewritten. I use the sequence you pass, and only fall back to get_referencing_foreign_keys() when it's None.

Tested with:
pytest tests/functions/test_merge_references.py::TestMergeReferencesWithForeignKeysParameter

Stop overwriting the optional foreign_keys argument so callers can
limit which referencing keys are rewritten, matching dependent_objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

merge_references ignores foreign_keys kwarg

1 participant