Skip to content

Add ValidateConstraintsOnSaveMixin (v12.13.0) - #110

Merged
GitRon merged 1 commit into
masterfrom
feature/validate-constraints-on-save-mixin
Aug 27, 2026
Merged

GitRon merged 1 commit into
masterfrom
feature/validate-constraints-on-save-mixin

Conversation

@GitRon

@GitRon GitRon commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Validates the models Meta.constraints on save, so a violation surfaces as a ValidationError carrying the constraint's violation_error_message instead of an IntegrityError from the database.

Description

Please include a summary of the change and which issue is fixed (if any).

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code follows the style guidelines of this project (linting passes)
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation where necessary
  • I have added an entry to CHANGES.md
  • I have bumped the version in ambient_toolbox/__init__.py

Validates the models Meta.constraints on save, so a violation surfaces as
a ValidationError carrying the constraint's violation_error_message instead
of an IntegrityError from the database.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@GitRon
GitRon merged commit dcfa3df into master Aug 27, 2026
13 checks passed
@GitRon
GitRon deleted the feature/validate-constraints-on-save-mixin branch August 27, 2026 11:35
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.

1 participant