GenericForeignKey always uses a default manager of a related model
From Django docs:
By default, Django uses an instance of a "plain" manager class when accessing related objects (i.e. choice.poll), not the default manager on the related object. This is because Django needs to be able to retrieve the related object, even if it would otherwise be filtered out (and hence be inaccessible) by the default manager.
This is true for ForeignKey, but not GenericForeignKey. So I have no ability to use custom managers for my models, because they are being filtered when I'm accessing related objects.
Change History
(8)
Owner: |
changed from nobody to Andy Durdin
|
Status: |
new → assigned
|
Has patch: |
set
|
Owner: |
changed from Andy Durdin to nobody
|
Status: |
assigned → new
|
Triage Stage: |
Unreviewed → Accepted
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Patch against trunk revision 16259