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
Problem
Foreign key lookups don't upcast to their actual type when a parent polymorphic model inherits from an abstract base class. This is inconsistent with the behavior described here.
Had the same issue. Moving the abstract class right of the PolymorphicModel in the class definition also resolves it.
So PolymorphicModel should be kept as first for the method resolution order.
Note: this wasn't an issue for django-polymorphic<2, so if you're migrating you need to make sure to adjust inheritance order like @mehmetakyuz noted above.
Problem
Foreign key lookups don't upcast to their actual type when a parent polymorphic model inherits from an abstract base class. This is inconsistent with the behavior described here.
Example:
A PR with a failing test has been made: #438
Resolution
Adding
base_manager_name = "objects"
toCommonInfo.Meta
resolves the issue.The text was updated successfully, but these errors were encountered: