Skip to content

Conversation

@mart-r
Copy link
Collaborator

@mart-r mart-r commented Nov 25, 2025

pydantic models that allow extra attribtues will be saved to __pdyandic_extra__ instead of the usual __dict__. And because of that the serialisation hasn't been picking those up.

This PR:

  • Introduces a test to show the problematic behaviour (i.e failure before changes)
  • Introduces a fix to said problematic behaviour

The workflow for the first commit is expected to fail during tests due to not having implemented the fix.
The second third commit's workflow should be successful (second one failed due to a typing issue).

@tomolopolis
Copy link
Member

Copy link
Member

@tomolopolis tomolopolis left a comment

Choose a reason for hiding this comment

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

lgtm

@mart-r mart-r merged commit 44a2de4 into main Nov 25, 2025
20 checks passed
@mart-r mart-r deleted the bug/medcat/CU-869b9dx49-fix-pydantic-model-serialisation branch November 25, 2025 11:22
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.

3 participants