diff --git a/polymorphic/query.py b/polymorphic/query.py index 454c526..97fc21a 100644 --- a/polymorphic/query.py +++ b/polymorphic/query.py @@ -393,6 +393,9 @@ class PolymorphicQuerySet(QuerySet): # now a superclass of real_concrete_class. Thus it's # sufficient to just use the field name. translated_field_name = field.rpartition('___')[-1] + + # Check if the field does exist. + # Ignore deferred fields that don't exist in this subclass type. try: real_concrete_class._meta.get_field(translated_field_name) except FieldDoesNotExist: