mirror of
https://github.com/django/django.git
synced 2025-04-04 05:26:43 +00:00
Thanks Carsten Fuchs. Backport of e15c55e2bf5eb2f1073d18b4ee6fdce2369820f2 from master
This commit is contained in:
parent
b39c970cfe
commit
e02616b1b0
@ -1283,6 +1283,8 @@ templates used by the :class:`ModelAdmin` views:
|
||||
class ArticleAdmin(admin.ModelAdmin):
|
||||
def save_formset(self, request, form, formset, change):
|
||||
instances = formset.save(commit=False)
|
||||
for obj in formset.deleted_objects:
|
||||
obj.delete()
|
||||
for instance in instances:
|
||||
instance.user = request.user
|
||||
instance.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user