Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored August 17, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/meta/fields.py
2  django/core/meta/fields.py
@@ -30,7 +30,7 @@ def manipulator_valid_rel_key(f, self, field_data, all_data):
30 30
     "Validates that the value is a valid foreign key"
31 31
     mod = f.rel.to.get_model_module()
32 32
     try:
33  
-        mod.get_object(**{'id__iexact': field_data})
  33
+        mod.get_object(pk=field_data)
34 34
     except ObjectDoesNotExist:
35 35
         raise validators.ValidationError, "Please enter a valid %s." % f.verbose_name
36 36
 

0 notes on commit f5ab132

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