Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@mvilanova
Copy link
Contributor

No description provided.

@mvilanova mvilanova requested a review from Copilot May 8, 2025 18:32
@mvilanova mvilanova self-assigned this May 8, 2025
@mvilanova mvilanova added bug Something isn't working enhancement New feature or request labels May 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the codebase to support pydantic v2 by using the new ConfigDict and model_validate features while also updating imports accordingly.

  • Added model_config with ConfigDict in ProjectRead to enable attribute-based initialization.
  • Updated pydantic ValidationError import in document/service.py.
  • Converted SQLAlchemy Project instances to Pydantic ProjectRead in individual/service.py and updated subsequent usage.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/dispatch/project/models.py Updated ProjectRead with a new model_config for pydantic v2 support.
src/dispatch/individual/service.py Replaced project usage with a validated ProjectRead instance via model_validate and updated corresponding create/update calls.
src/dispatch/document/service.py Updated the import for ValidationError to align with pydantic v2 standards.

@mvilanova mvilanova merged commit 2d732e5 into main May 8, 2025
8 of 9 checks passed
@mvilanova mvilanova deleted the fix/pydantic branch May 8, 2025 20:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants