mirror of https://github.com/django/django.git
Thanks Carsten Fuchs.
This commit is contained in:
parent
fb267a1d85
commit
e15c55e2bf
|
@ -1259,6 +1259,8 @@ templates used by the :class:`ModelAdmin` views:
|
||||||
class ArticleAdmin(admin.ModelAdmin):
|
class ArticleAdmin(admin.ModelAdmin):
|
||||||
def save_formset(self, request, form, formset, change):
|
def save_formset(self, request, form, formset, change):
|
||||||
instances = formset.save(commit=False)
|
instances = formset.save(commit=False)
|
||||||
|
for obj in formset.deleted_objects:
|
||||||
|
obj.delete()
|
||||||
for instance in instances:
|
for instance in instances:
|
||||||
instance.user = request.user
|
instance.user = request.user
|
||||||
instance.save()
|
instance.save()
|
||||||
|
|
Loading…
Reference in New Issue