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: support generic models with discriminated union #3551

Merged

Conversation

PrettyWood
Copy link
Member

Change Summary

Generic models were not handled properly by the new discriminated union feature

Related issue number

closes #3549

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)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@PrettyWood PrettyWood added the bug V1 Bug related to Pydantic V1.X label Dec 20, 2021
@PrettyWood PrettyWood force-pushed the fix-discriminated-union-generic branch from 198aada to 0ff1af3 Compare December 20, 2021 17:18
@PrettyWood
Copy link
Member Author

please review

@PrettyWood PrettyWood force-pushed the fix-discriminated-union-generic branch from 0ff1af3 to 8e6b3d9 Compare December 20, 2021 17:26
@samuelcolvin samuelcolvin merged commit e882277 into pydantic:master Dec 24, 2021
@PrettyWood PrettyWood deleted the fix-discriminated-union-generic branch December 24, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug V1 Bug related to Pydantic V1.X ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field with discriminator on generic causes AssertionError. (1.9.0a1)
2 participants