Commit 7b201f6e authored by Georg Bauer's avatar Georg Bauer
Browse files

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
parent e4e28d90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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: