﻿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
6762	TabularInline in Admin breaks when fields have default values	ingenieroariel	nobody	"In the following code, everytime the save button is hit in the parent change_form it complains about empty inline model.
I guess it is because default values are assigned to some fields and it tries to save the partially empty objects.

Here is a simple example that works ok, without the default

{{{
from django.db import models
from django.contrib import admin
# Create your models here.

class Parent(models.Model):
    name=models.CharField(max_length=20)

CHOICES = (

        ('choice', 'choice'),

        ('choice1', 'choice1'),

    ) 
class Son(models.Model):
    name=models.CharField(max_length=20)
    parent=models.ForeignKey(Parent)
    choice=models.CharField(max_length=20, choices=CHOICES, default='choice')

class SonModelInline(admin.TabularInline):
    model = Son
    extra = 1

class ParentOptions(admin.ModelAdmin):
    inlines = [SonModelInline]

admin.site.register(Son)
admin.site.register(Parent, ParentOptions)
}}}
"		closed	contrib.admin	newforms-admin		duplicate	inline, default, save, newforms-admin		Unreviewed	0	0	0	0		
