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
I did some searching in the closed issues, and it looks like the decision was to raise an exception when attempting to use ModelSerializer with an abstract base class model. (#2757)
I have a model that inherits from an abstract base class model. No exception was thrown by DRF. Additionally, the Serializer doesn't generate the fields for the sub-class, instead it only renders the fields from the abstract base class.
If this isn't going to be supported, the assertion should probably check if the superclass is abstract and then fail loudly.
I'm on DRF 3.1.3.
The text was updated successfully, but these errors were encountered:
@erikcw The bug you are referring to is about using an abstract model with a ViewSet, not using a model that inherits from an abstract model.
Could you provide a test case about this ? I think already use models that inherits from an abstract class without any major issue.
I did some searching in the closed issues, and it looks like the decision was to raise an exception when attempting to use
ModelSerializer
with an abstract base class model. (#2757)I have a model that inherits from an abstract base class model. No exception was thrown by DRF. Additionally, the Serializer doesn't generate the fields for the sub-class, instead it only renders the fields from the abstract base class.
If this isn't going to be supported, the assertion should probably check if the superclass is abstract and then fail loudly.
I'm on DRF 3.1.3.
The text was updated successfully, but these errors were encountered: