#4136: NULL fields and Unique keys
------------------------------------------------+---------------------------
Reporter: David Cramer <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component:
Database wrapper
Version: 0.96 | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 0 | Needs_docs: 1
Needs_tests: 0 | Needs_better_patch: 0
------------------------------------------------+---------------------------
Changes (by nix):
* cc: [EMAIL PROTECTED] (added)
Comment:
Malcolm
I have to respectfully disagree with you on this issue. I have the
following in a model:
mac_address = models.CharField(maxlength=12, blank=True, null=True,
unique=True)
This causes the admin interface to throw database constraint errors
whenever there is more than one empty mac address in the table. If the
admin interface correctly left these as NULL then everything would work
properly. If you can tell me a better way to get the behaviour I need then
I am open to suggestions (Field should be blank or unique) as I use this
for a large number of fields and the fact that it works properly on
everything except strings is very frustrating.
--
Ticket URL: <http://code.djangoproject.com/ticket/4136#comment:6>
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
-~----------~----~----~----~------~----~------~--~---