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

Fix dict with extra keys #490

Merged
merged 3 commits into from Apr 25, 2019

Conversation

j1king
Copy link
Contributor

@j1king j1king commented Apr 24, 2019

Change Summary

This will fix key error that occurs when calling model.dict(by_alias=True) with the model contains extra keys.

Related issue number

Resolves #488

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • HISTORY.rst has been updated
    • if this is the first change since a release, please add a new section
    • include the issue number or this pull request number #<number>
    • include your github username @<whomever>

@j1king j1king changed the title Fix dict with extra keys (#489) Fix dict with extra keys (#490) Apr 24, 2019
@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #490 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #490   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     14           
  Lines        2251   2251           
  Branches      443    443           
=====================================
  Hits         2251   2251

@j1king j1king changed the title Fix dict with extra keys (#490) Fix dict with extra keys Apr 24, 2019
Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

otherwise LGTM.

tests/test_main.py Outdated Show resolved Hide resolved
@samuelcolvin samuelcolvin merged commit a3d9ad1 into pydantic:master Apr 25, 2019
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
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.

.dict(by_alias=True) throws an exception when trying to call with extra keys
2 participants