Kaydet (Commit) 7b201f6e authored tarafından Georg Bauer's avatar Georg Bauer

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
üst e4e28d90
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment