#14102: Model._get_unique_checks can return fields that are in the exclude list
------------------------------------------+---------------------------------
 Reporter:  tclineks                      |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  1                             |  
------------------------------------------+---------------------------------
 _get_unique_checks will return fields listed in the exclude list if they
 are on the other end of a unique_for_*

 This in practice means that if you validate a ModelForm without the
 depended on field for a unique_for_* constraint _perform_unique_checks
 will raise an exception when it attempts to access attributes of
 getattr(self, unique_for) (since it's None).

 Attached is a patch that prevents fields from being returned as date
 checks if they're in the excludes list and augments two appropriate tests.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14102>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to