Permalink
Browse files

[soc2009/admin-ui] Fixing ticket #11682. Thanks to fredbartle for the…

… patch.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/admin-ui@11935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent c1aeb0d commit 7b2cdd0209df301285570b7678830c060d29c4d8 @zain zain committed Dec 22, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/forms/models.py
View
2 django/forms/models.py
@@ -676,7 +676,7 @@ def pk_is_not_editable(pk):
pk_value = form.instance.pk
else:
try:
- if index:
+ if index is not None:
pk_value = self.get_queryset()[index].pk
else:
pk_value = None

0 comments on commit 7b2cdd0

Please sign in to comment.