Skip to content

Run UUID validators before writing values - #2408

Open
IlyaKhalafi wants to merge 1 commit into
tortoise:developfrom
IlyaKhalafi:daily/2026-11-06/tortoise-orm
Open

IlyaKhalafi wants to merge 1 commit into
tortoise:developfrom
IlyaKhalafi:daily/2026-11-06/tortoise-orm

Conversation

@IlyaKhalafi

Copy link
Copy Markdown
Contributor

Description

This PR fixes UUIDField skipping configured validators during writes. With this, invalid UUID values are rejected during creation, saves and queryset updates, while nullable None values still skip validators.

Motivation and Context

Fixes #2407.

How Has This Been Tested?

Both new regressions fail before the fix. The SQLite suite passes on Python 3.14 with 2,194 passed, 145 skipped and two expected failures. make check passes using the prepared development environment. Other database servers were not tested locally.

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed in the local SQLite suite.

@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 21 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 24 untouched benchmarks


Comparing IlyaKhalafi:daily/2026-11-06/tortoise-orm (c26d920) with develop (5797ac3)

Open in CodSpeed

This branch has not been deployed

No deployments
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.

UUIDField skips configured validators when writing values

1 participant