#22534: Checks fail on non-swappable ForeignKeys when the related model is
swapped
out
----------------------------+----------------------------------------
Reporter: bendavis78 | Owner: andrewgodwin
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7-beta-2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------
Comment (by andrewgodwin):
Not quite; first of all, this is designed for FKs that point to models
that might be the swap-in replacement - e.g. `myapp.User`, not
`django.contrib.auth.User`.
`swappable=True` means "if the other end of this foreignkey is currently
the value of AUTH_USER_MODEL then make this FK point to
`settings.AUTH_USER_MODEL`
`swappable=False` means "even if the other end of this is the current
value of AUTH_USER_MODEL, don't do a swappable link, do it directly, as I
really want to always link to `myapp.User`, never to the generic user
model". It's meant for companion models that are definitely only for a
certain user model.
--
Ticket URL: <https://code.djangoproject.com/ticket/22534#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.8a1bbf88f832349dc7f6e68ec29c760a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.