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
Hi, I added a use case in the test model here but can't replicate, do you have more informations ? django version, models used, any customizations of the serializer ?
Note that in the meantime you can create a custom serializer for this field.
Hi, so the problem is that in the serializer for some reason 'field' is not an instance of Field but ManyToOneRel which is not a subclass of Field.
Can you show me the query(ies) and the serializer ?
Hi, the problem is that reverse relationships are not implemented, it's a big blunder so thx for pointing it out. I started a PR it should solve your problem but it will requires more work before i can merge it.
Activity
lauxley commentedon Jan 26, 2016
Hi, I added a use case in the test model here but can't replicate, do you have more informations ? django version, models used, any customizations of the serializer ?
Note that in the meantime you can create a custom serializer for this field.
skabbit commentedon Jan 29, 2016
My apologies, I've got this problem on serializing ManyToOne relation like this:
And yes, I'm using custom serializer to solve this problem.
lauxley commentedon Feb 2, 2016
Hi, so the problem is that in the serializer for some reason 'field' is not an instance of Field but ManyToOneRel which is not a subclass of Field.
Can you show me the query(ies) and the serializer ?
skabbit commentedon Feb 3, 2016
Here is the AgencyEsSerializer, with custom serializer for this field:
And here is the code, causing the problem:
lauxley commentedon Feb 4, 2016
Hi, the problem is that reverse relationships are not implemented, it's a big blunder so thx for pointing it out. I started a PR it should solve your problem but it will requires more work before i can merge it.
skabbit commentedon Feb 5, 2016
Tnx a lot for this patch and for whole module of cause! 👍
I hope soon I'll have a time to contribute.