Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better errors when serializer has incorrectly named field. #2262

Closed
picturedots opened this issue Dec 12, 2014 · 0 comments · Fixed by #2267
Closed

Better errors when serializer has incorrectly named field. #2262

picturedots opened this issue Dec 12, 2014 · 0 comments · Fixed by #2267

Comments

@picturedots
Copy link

If I have a mistake in my model serializer where there's a serializer field name that isn't mapped to a field in the model, e.g.

class MySerializer(serializers.ModelSerializer):
    bad_serializer_field_name = MyCustomSerializer()

then the serializer fails silently and by returning no no data. It would be nice for debugging if the serialization process would issue a warning.

@picturedots picturedots changed the title Better error messaging if serializer Meta fields list has a bad value Better error messaging if model serializer has a field not mapped to a model field or property Dec 12, 2014
@tomchristie tomchristie added this to the 3.0.2 Release milestone Dec 12, 2014
@tomchristie tomchristie changed the title Better error messaging if model serializer has a field not mapped to a model field or property Better errors when serializer has incorrectly named field. Dec 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants