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 error messaging if serializer Meta fields list has a bad value #2347

Closed
picturedots opened this issue Dec 23, 2014 · 1 comment
Closed

Comments

@picturedots
Copy link

This is the bug that I originally reported in #2262 -- if you have a ModelSerializer with a field in Meta that doesn't map to a property or model field, serializer.data fails silently in 3.0.2, and returns no value. For example, if 'bad_field' doesn't map to anything you'll see.

class MyModelSerializer(ModelSerializer):
    class Meta:
        model = MyModel
        fields = ('good_field', 'bad_field')

My bad, I should have reported two separate issues earlier.

@tomchristie
Copy link
Member

This report doesn't appear correct to me.

Happy to reopen if there's a simple replicable example.
Perhaps I'm misunderstanding the issue you're trying to raise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants