﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7449	edit_inline with IntegerField  cause error: 'int' object is unsubscriptable	rudyryk <alexey.rudy@…>	nobody	"I'm using revision 7631, latest for now.

Error occurs in both cases: when creating and editing new object. Models are taken from tutorial. See traceback and code below.

{{{
Traceback:
File ""C:\Python25\Lib\site-packages\django\core\handlers\base.py"" in get_response
  82.                 response = callback(request, *callback_args, **callback_kwargs)
File ""C:\Python25\Lib\site-packages\django\contrib\admin\views\decorators.py"" in _checklogin
  62.             return view_func(request, *args, **kwargs)
File ""C:\Python25\lib\site-packages\django\views\decorators\cache.py"" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File ""C:\Python25\Lib\site-packages\django\contrib\admin\views\main.py"" in add_stage
  264.             new_object = manipulator.save(new_data)
File ""C:\Python25\Lib\site-packages\django\db\models\manipulators.py"" in save
  173.                         if f.core and not isinstance(f, FileField) and f.get_manipulator_new_data(rel_new_data, rel=True) in (None, ''):
File ""C:\Python25\lib\site-packages\django\db\models\fields\__init__.py"" in get_manipulator_new_data
  363.             return new_data.get(self.name, [self.get_default()])[0]

Exception Type: TypeError at /admin/my_hello/poll/add/
Exception Value: 'int' object is unsubscriptable
}}}

{{{
#!python
from django.db import models
import datetime

# Create your models here.

class Poll(models.Model):
	question = models.CharField(max_length=200)
	pub_date = models.DateTimeField('date published')
	class Admin:
		pass
	def __unicode__(self):
		return self.question

class Choice(models.Model):
	poll = models.ForeignKey(Poll, edit_inline=models.TABULAR, min_num_in_admin=3)
	choice = models.CharField(max_length=200, core=True)
	votes = models.IntegerField(core=True, default=0)
	class Admin:
		pass	
	def __unicode__(self):
		return self.choice
}}}"		closed	contrib.admin	dev		worksforme		alexey.rudy@…	Unreviewed	0	0	0	0	0	0
