#34166: UniqueConstraint with condition not validated if the condition field is 
not
editable.
-------------------------------------+-------------------------------------
     Reporter:  Márton Salomváry     |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  4.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  model validation     |             Triage Stage:
  unique constraint condition        |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 For your project, defining model form subclass for
 
[https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_form
 ModelAdmin.get_form] implementing clean validating the non-editable field
 would be the way to go.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34166#comment:3>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018484cc21f4-6367c2ad-cfdd-49c9-b7b6-89249b719ea7-000000%40eu-central-1.amazonses.com.

Reply via email to