Closed jscn closed 8 years ago
The above PR just demonstrates the issue at the moment. I'll try and get a fix together in the meantime.
Well, I goofed that up. Still working on a test to reproduce the issue I'm seeing in my application. Might actually be an error on my end after all...
Ugh, my bad, had my MRO confused. Schoolboy error :/
If I have a serializer,
TopLevelSerializer
with aMethodField
which uses a methodget_thing
to calculate the value of the field, when I create another serializer which inherits fromTopLevelSerializer
and re-implementget_thing
on that child class, I expect the child class's implementation ofget_thing
to be called when I serialize an object with the child class. However, theTopLevelSerializer
's implementation is always called. This breaks the standard way that inheritance is supposed to work in Python.