From 7b201f6e520d5fb757925e776aee128c6e1c9749 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Mon, 21 Nov 2005 11:09:36 +0000 Subject: [PATCH] fixed a bug that prevented the unique validation to work git-svn-id: http://code.djangoproject.com/svn/django/trunk@1329 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index 27ce0670d5..3ae9587579 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -50,7 +50,7 @@ def manipulator_validator_unique(f, opts, self, field_data, all_data): if f.rel and isinstance(f.rel, ManyToOne): lookup_type = '%s__%s__exact' % (f.name, f.rel.get_related_field().name) else: - lookup_type = '%s__exact' % (f.name, lookup_type) + lookup_type = '%s__exact' % f.name try: old_obj = opts.get_model_module().get_object(**{lookup_type: field_data}) except ObjectDoesNotExist: