You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class CoreModel(models.Model):
name = models.TextField()
class ProxyModel(CoreModel):
class Meta:
proxy = True
in qs.py, when resolving a where a model has a relationship with ProxyModel, the code currently traverses:: related_descriptor.rel.field.model
however, if the related model is ProxyModel , then this resolution path ends up with CoreModel
If you instead follow: related_descriptor.rel.model._meta.proxy, you can check if it's a proxy model and then related_queryset = related_descriptor.rel.model.objects.all() will get you the right qs
The text was updated successfully, but these errors were encountered:
@j4mie thanks for the reply, i'm sure there was a move professional way of submitting this. Would you like me to submit a file which highlights where it falls down?
take the case of :
in qs.py, when resolving a where a model has a relationship with
ProxyModel,
the code currently traverses::related_descriptor.rel.field.model
however, if the related model is
ProxyModel
, then this resolution path ends up withCoreModel
If you instead follow:
related_descriptor.rel.model._meta.proxy
, you can check if it's a proxy model and thenrelated_queryset = related_descriptor.rel.model.objects.all()
will get you the right qsThe text was updated successfully, but these errors were encountered: