Checks fail on non-swappable ForeignKeys when the related model is swapped out
|Reported by:||Ben Davis||Owned by:||Andrew Godwin|
|Cc:||Ben Davis||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The documentation states that setting
swappable=False on a
ForeignKey allows you to reference a swappable model even if that model is swapped out. Unfortunately this doesn't work because RelatedField's check function will look for that model in
apps.get_models(), which doesn't include swapped models by default.
ForeignKey references a swapped out model and has swappable=False, shouldn't that model be loaded? It seems to me that
swapped=False will never work because of this.
Change History (10)
comment:1 Changed 2 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|
|Version:||master → 1.7-beta-2|