diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-11 07:34:11 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-07-11 07:34:11 +0000 |
| commit | 1e00458521b81bc86883ce938ea689b799bfd928 (patch) | |
| tree | eac76c626a6b98c039154a7fb4caf3469f2ded19 | |
| parent | e18fccc62e6463c9247892bce7fd5ce125b526ac (diff) | |
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 puyb@puyb.net and Karen
Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/models/fields/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index a69cc5ac8c..a97adef474 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -326,7 +326,7 @@ class Field(object): 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 |
