#4928: unique_together bug when it's not a tuple. Validation missing
---------------------------------------------------------+------------------
Reporter: MarioGonzalez <gonzalemario @t gmail.com> |
Owner: deryck
Status: closed |
Component: Core framework
Version: SVN |
Resolution: invalid
Keywords: |
Stage: Accepted
Has_patch: 1 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 1
---------------------------------------------------------+------------------
Changes (by deryck):
* status: assigned => closed
* resolution: => invalid
Comment:
Closing as invalid since existing validation will error on the case that
the field name doesn't exist. In others words, the following already
fails validation...
{{{
unique_together = 'foo, bar'
}}}
or
{{{
unique_together = ('foo', 'bar')
}}}
so why should we test for the single case of unique_together being a
string?
However, we should probably allow the single tuple, rather than the tuple
of tuples for convenience. I've opened #5460 for this new issue.
--
Ticket URL: <http://code.djangoproject.com/ticket/4928#comment:8>
Django Code <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
-~----------~----~----~----~------~----~------~--~---