Skip to content

Update UniqueFieldsMixin to support DRF 3.11 validator context API #96

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
merged 1 commit into from
Dec 23, 2019
Merged

Update UniqueFieldsMixin to support DRF 3.11 validator context API #96

merged 1 commit into from
Dec 23, 2019

Conversation

mands
Copy link
Contributor

@mands mands commented Dec 22, 2019

DRF 3.11 changed how context is passed into validators to fix a race-condition, as described in the following links

This PR provides support for this new API in a backwards-compatible way, using set_context if available/on older DRF, and passing the field in with the __call__ if not.

@codecov-io
Copy link

codecov-io commented Dec 22, 2019

Codecov Report

Merging #96 into master will decrease coverage by 0.46%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
- Coverage   99.05%   98.59%   -0.47%     
==========================================
  Files           3        3              
  Lines         211      213       +2     
==========================================
+ Hits          209      210       +1     
- Misses          2        3       +1
Impacted Files Coverage Δ
drf_writable_nested/mixins.py 98.5% <75%> (-0.49%) ⬇️

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 f11b68e...f32ad59. Read the comment docs.

@ruscoder ruscoder merged commit 16e18c3 into beda-software:master Dec 23, 2019
@ruscoder
Copy link
Member

@mands Thanks, merged

@ruscoder
Copy link
Member

Available on PyPI as v0.5.4

@mands mands deleted the fix/drf-311-validators branch March 6, 2023 15:55
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy