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

Added missing error message when no resource name is configured on serializer #1020

Merged
merged 6 commits into from
Dec 5, 2021
Merged

Added missing error message when no resource name is configured on serializer #1020

merged 6 commits into from
Dec 5, 2021

Conversation

jokiefer
Copy link
Contributor

@jokiefer jokiefer commented Dec 2, 2021

Partial fix of #1019

Description of the Change

Enhanced the error message on get_resource type from serializer() to tell the user which serializer in which module is wrong configured.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. See my inlines comments.

Additionally:

  • add yourself to AUTHORS
  • add changelog entry (I would add it to Fixed)
  • run black formatting and look at linting issues (see Github Actions which are failing).

tests/test_utils.py Outdated Show resolved Hide resolved
rest_framework_json_api/utils.py Outdated Show resolved Hide resolved
@jokiefer jokiefer requested a review from sliverc December 3, 2021 13:19
@sliverc sliverc changed the title Bug/1019 enhance error message Added missing error message when no resource name is configured on serializer Dec 5, 2021
Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.

@sliverc sliverc merged commit a4262dd into django-json-api:master Dec 5, 2021
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

Successfully merging this pull request may close these issues.

2 participants