Now there is problem with polymorphic models and invalidate_m2o.
When Model is inherited it's pk field is OneToOne field to parent model. And if there is some other model with FK to inherited model, this FK points to OneToOne field. In this situation getattr(instance, f.field_name) will return model instance of parent model, when we need to get id.
Now there is problem with polymorphic models and invalidate_m2o. When Model is inherited it's pk field is OneToOne field to parent model. And if there is some other model with FK to inherited model, this FK points to OneToOne field. In this situation getattr(instance, f.field_name) will return model instance of parent model, when we need to get id.
Pull request: https://github.com/Suor/django-cacheops/pull/430