I override save\_form to automatically populate the author field in class Grievances by using obj.author = request user. Works great. But then, for purposes of the inline, I try the same thing using obj.status\_author = request.user. Doesn't work - nothing is input and the sql execution fails because status\_author is a required field.

The successful overriding of save\_form takes place in my GrievancesAdmin for obj.author. If I try the same thing for obj.status\_author, but in GrievanceStatusAdmin (which gets inlined), it does not work as nothing in input.

I have the following files:

models.py

```
class Grievances(models.Model):
    title = models.CharField(max_length=90)
    author = models.ForeignKey(User, related_name='grievance_author')
    firefighter = models.ForeignKey(User, related_name='firefighter_harmed')
    ...

class GrievanceStatus(models.Model):
    title = models.ForeignKey(Grievances)
    updatetext = models.TextField(blank=True)
    action = models.CharField(max_length=20)
    status_author = models.ForeignKey(User, related_name='grievance_status_author')

```

forms.py

```
class UserModelChoiceField(forms.ModelChoiceField):
    """ Override to use full name in ChoiceField """
    def label_from_instance(self, obj):
        return "%s (%s)" % (obj.get_full_name(), obj.username)

class GrievanceForm(forms.ModelForm):
    firefighter = UserModelChoiceField(User.objects.all().order_by('last_name')) 
    class Meta:
        model = Grievances

class GrievanceStatusForm(forms.ModelForm):
    class Meta:
        model = GrievanceStatus
        fields = ('action', 'updatetext', )

```

admin.py

```
class GrievanceStatusInline(admin.StackedInline):
    model = GrievanceStatus
    fk_name = 'title'
    form = GrievanceStatusForm
    list_select_related = True

class GrievancesAdmin(admin.ModelAdmin):
    list_display = ('title', 'firefighter',)
    inlines = [ GrievanceStatusInline ]
    form = GrievanceForm

    def save_formset(self, request, form, formset, change):
        ### something is wrong with the following line but i'm not sure what ###
        obj2 = super(GrievancesAdmin, self).save_formset(request, form, formset, change)
        obj2.status_author = request.user
        formset.save()

    def save_form(self, request, form, change):
        obj = super(GrievancesAdmin, self).save_form(request, form, change)
        obj.firefighter = User.objects.get(username__exact=obj.firefighter)
        obj.status_author = request.user
        if not change:
            obj.author = request.user
        obj.date_updated = datetime.datetime.now()
        return obj
admin.site.register(Grievances, GrievancesAdmin)

```

Thanks!