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

Bug fix: excludes skipped for aliased nested fields when by_alias=True #1398

Conversation

AlexECX
Copy link
Contributor

@AlexECX AlexECX commented Apr 16, 2020

Change Summary

Always use a field's real name with includes/excludes in model._iter(), regardless of by_alias.

Related issue number

Related to #1397

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@AlexECX AlexECX changed the title Bug fix: excludes skipped for aliased nested fields when by_alias=true Bug fix: excludes skipped for aliased nested fields when by_alias=True Apr 16, 2020
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #1398 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #1398   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3736      3736           
  Branches       739       739           
=========================================
  Hits          3736      3736           

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 9a8bda5...4392a43. Read the comment docs.

@samuelcolvin samuelcolvin merged commit 92b0bbc into pydantic:master Apr 18, 2020
@samuelcolvin
Copy link
Member

Thanks so much. Quick work!

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.

None yet

2 participants