Skip to content
Browse files

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

…ject's primary key was called 'id'

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent b1d9682 commit f5ab1320ed3acbbc8b8bc358a46f5ae1380deff9 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/core/meta/
2 django/core/meta/
@@ -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 =
- 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

0 comments on commit f5ab132

Please sign in to comment.
Something went wrong with that request. Please try again.