#33335: Detecting uniqueness doesn't work for models with functional unique
constraints.
---------------------------------+------------------------------------
     Reporter:  Hervé Le Roy     |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.admin    |                  Version:  4.0
     Severity:  Release blocker  |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

 
[https://github.com/django/django/blob/d3f4c2b95d2a13a5d9bc0e6413dfdbab21388822/django/db/models/base.py#L1063-L1119
 Model._get_unique_checks()] and related methods don't handle unique
 constraints with expressions, because `_get_unique_checks()` returns a
 constraint without fields which is violated when there are any rows. I can
 try to solve it on Monday, unless someone does on the weekend.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33335#comment:6>
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/064.d803c6d0da294741cadee8c0325f00d6%40djangoproject.com.

Reply via email to