Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow parser context to be None #981

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

Merged
sliverc merged 1 commit into django-json-api:master from sliverc:parse_context_none
Sep 23, 2021

Conversation

Copy link
Member

@sliverc sliverc commented Sep 23, 2021

Description of the Change

Default parameter of parser_context was already set to None but would had always raised an error when it was actually None.

DRF parser allows parser_context to be None so this PR makes the DJA parser fully compatible with DRF API.

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 Author

sliverc commented Sep 23, 2021

Just as a follow up I discovered this issue while implementing PR #898. So it is basically an issue which can occur during testing.

Copy link

codecov bot commented Sep 23, 2021
edited
Loading

Codecov Report

Merging #981 (fcbca4f) into master (a6644eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #981 +/- ##
=======================================
 Coverage 96.82% 96.82% 
=======================================
 Files 65 65 
 Lines 3904 3906 +2 
=======================================
+ Hits 3780 3782 +2 
 Misses 124 124 
Impacted Files Coverage Δ
rest_framework_json_api/parsers.py 98.59% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6644eb...fcbca4f. Read the comment docs.

Default parameter of `parser_context` was already set to `None`
but would had always raised an error.
DRF parser allows `parser_context` to be `None` to so brings DJA to
use the same API.
@sliverc sliverc merged commit 29971b4 into django-json-api:master Sep 23, 2021
@sliverc sliverc deleted the parse_context_none branch September 23, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@n2ygk n2ygk n2ygk approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /