Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug in manipulator_valid_rel_key() -- it assumed the related ob…

…ject's primary key was called 'id'

git-svn-id: http://code.djangoproject.com/svn/django/trunk@530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f5ab1320ed3acbbc8b8bc358a46f5ae1380deff9 1 parent b1d9682
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/meta/fields.py
View
2  django/core/meta/fields.py
@@ -30,7 +30,7 @@ def manipulator_valid_rel_key(f, self, field_data, all_data):
"Validates that the value is a valid foreign key"
mod = f.rel.to.get_model_module()
try:
- mod.get_object(**{'id__iexact': field_data})
+ mod.get_object(pk=field_data)
except ObjectDoesNotExist:
raise validators.ValidationError, "Please enter a valid %s." % f.verbose_name
Please sign in to comment.
Something went wrong with that request. Please try again.