﻿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
19405	Long integers cause DatabaseError when submitting ModelForm	Daniil Ryzhkov	nobody	"Let's say there is a model:

{{{
class TestModel(models.Model):
    test_field = models.IntegerField()
}}}

And ModelForm (instread of this step you can just register model in admin):

{{{
class TestForm(forms.ModelForm):

    class Meta:
        model = TestModel
}}}

And view:

{{{
def test_view(request):
    ...
    if form.is_valid():
        ad.save()
}}}

When from is submitted Django returns ""DatabaseError: current transaction is aborted, commands ignored until end of transaction block"" if submitted integer is above 2147483647 (which is database maximum value for integer). This affects both contrib.admin generated form and ModelForm.
This was tested on Django 1.4 with Debian Squeeze and PostgreSQL 9.1 aboard."	Bug	closed	Forms	1.4	Normal	duplicate	form, admin, DatabaseError, ModelForm		Unreviewed	0	0	0	0	0	0
