Opened 84 minutes ago
Last modified 84 minutes ago
#37329 new Uncategorized
Allow customizing ValidationError code in UniqueConstraint
| Reported by: | Tim Schilling | Owned by: | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
This is based on @xafer's PR. It was a follow-up to #34338.
Since violation_error_code could never be defined for UniqueConstraint prior to #16560 there is no backward compatibility to bother with.
But if the user bothered to provide a violation_error_code to its UniqueConstraint it is likely expecting it to be used.
I think it makes sense given that we now allow more customization of these constraints to allow customizing the violation_error_code as well.
Change History (1)
comment:1 by , 84 minutes ago
| Summary: | Allowed customizing ValidationError code in UniqueConstraint → Allow customizing ValidationError code in UniqueConstraint |
|---|
Note:
See TracTickets
for help on using tickets.