#35910: Use violation_error_message on UniqueContraint when only fields and no
constraint is provided
-------------------------------------+-------------------------------------
     Reporter:  James Walters        |                    Owner:  (none)
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  duplicate
     Keywords:  forms, models,       |             Triage Stage:
  unique constraints                 |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * resolution:   => duplicate
 * status:  new => closed

Comment:

 I think you ran into #35103 which was recently fixed by
 e970bb7ca71c00594b42a024a15a8ac007cc2c7a and will be part of Django 5.2.

 You can try it out against `main` and
 [https://docs.djangoproject.com/en/dev/ref/models/constraints/#id2 refer
 to the updated documentation] in the mean time.

 > In older versions, the provided `UniqueConstraint.violation_error_code`
 was not used when `UniqueConstraint.fields` was set without a
 `UniqueConstraint.condition`.

 Please re-open if you believe you are running into a different issue.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35910#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070193271bd4c5-8637c89d-9028-4f53-b488-8976fff8e4e9-000000%40eu-central-1.amazonses.com.

Reply via email to