Author: mtredinnick
Date: 2008-07-11 02:34:11 -0500 (Fri, 11 Jul 2008)
New Revision: 7882
Modified:
django/trunk/django/db/models/fields/__init__.py
Log:
Fixed #7682 -- Added a work around to keep existing admin alive until
newforms-admin merges (to handle changes in [7790]).
This code becomes irrelevant in a non-oldforms world, so even if it's not quite
correct, it will do for now. Based on a patch from [EMAIL PROTECTED] and Karen
Tracey.
Modified: django/trunk/django/db/models/fields/__init__.py
===================================================================
--- django/trunk/django/db/models/fields/__init__.py 2008-07-10 20:47:18 UTC
(rev 7881)
+++ django/trunk/django/db/models/fields/__init__.py 2008-07-11 07:34:11 UTC
(rev 7882)
@@ -326,7 +326,7 @@
params['validator_list'].append(getattr(manipulator,
'isUnique%sFor%s' % (self.name, self.unique_for_month)))
if self.unique_for_year:
params['validator_list'].append(getattr(manipulator,
'isUnique%sFor%s' % (self.name, self.unique_for_year)))
- if self.unique or (self.primary_key and not rel):
+ if self.unique and not rel:
params['validator_list'].append(curry(manipulator_validator_unique, self, opts,
manipulator))
# Only add is_required=True if the field cannot be blank. Primary keys
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---