Add extra comment why deferred fields are skipped with ___ lookups
parent
2e16112cbe
commit
30630647c4
|
|
@ -393,6 +393,9 @@ class PolymorphicQuerySet(QuerySet):
|
||||||
# now a superclass of real_concrete_class. Thus it's
|
# now a superclass of real_concrete_class. Thus it's
|
||||||
# sufficient to just use the field name.
|
# sufficient to just use the field name.
|
||||||
translated_field_name = field.rpartition('___')[-1]
|
translated_field_name = field.rpartition('___')[-1]
|
||||||
|
|
||||||
|
# Check if the field does exist.
|
||||||
|
# Ignore deferred fields that don't exist in this subclass type.
|
||||||
try:
|
try:
|
||||||
real_concrete_class._meta.get_field(translated_field_name)
|
real_concrete_class._meta.get_field(translated_field_name)
|
||||||
except FieldDoesNotExist:
|
except FieldDoesNotExist:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue