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 extra fields check in Model.__getattr__() #9082

Merged
merged 1 commit into from Mar 22, 2024

Conversation

NeevCohen
Copy link
Contributor

@NeevCohen NeevCohen commented Mar 22, 2024

Change Summary

Fix a check in Model.__getattr__() which tries to get an attribute from the __pydantic_extra__ dict even though its empty.

Related issue number

Fix #9070

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @dmontagu

Copy link

codspeed-hq bot commented Mar 22, 2024

CodSpeed Performance Report

Merging #9082 will not alter performance

Comparing NeevCohen:fix/model-extra-fields-check (9e3878b) with main (e58134b)

Summary

✅ 10 untouched benchmarks

@NeevCohen
Copy link
Contributor Author

Please review

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Great find! Thanks!!

@sydney-runkle sydney-runkle added the relnotes-fix Used for bugfixes. label Mar 22, 2024
@sydney-runkle sydney-runkle merged commit f794f65 into pydantic:main Mar 22, 2024
53 of 55 checks passed
@NeevCohen NeevCohen deleted the fix/model-extra-fields-check branch March 22, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected error message while using properties with pydantic models
3 participants