-
Notifications
You must be signed in to change notification settings - Fork 234
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: do not override Document._class_id if it was explicitly set on the document class #1133
base: main
Are you sure you want to change the base?
fix: do not override Document._class_id if it was explicitly set on the document class #1133
Conversation
…ocument class discriminator case), fixes BeanieODM#1132
Hi @volfpeter. Thank you for the issue report/PR. |
Hi, Thanks for the quick response. I just fixed the existing tests. I'll add a new test for this specific case. |
@staticxterm I added basically the same set of tests that currently exist for the standard inheritance case. Admittedly, parametrized tests would have been nicer, but I didn't want to start that refactoring, because I have very limited time (and kind of need this fix as soon as possible). Let me know if I should change anything. |
@staticxterm Do you have an idea why the "3.13, 8.0, 1.10.18" test failed? I ran the test suite locally with the same Python and package versions (Python 3.13, pytest 8.3.4, and both pydantic 1.10.18 and 1.10.21), and all tests passed. |
Hi @volfpeter, the test failed because yes there is some flakiness. I'll look into it. |
Thanks! First I thought this was the case, but then it seemed that locally it's always passing, and the CI job is always failing, and I didn't want to trigger to useless reruns. |
Fixes #1132