1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #23387 -- Kept "Save as new" button after validation errors in admin.

When "Save as new" is chosen and errors occur, only show the "Save as new"
button and not the other save buttons.

Thanks to Tino de Bruijn for doing the real work on this fix.
This commit is contained in:
Adam Zapletal
2015-04-24 20:31:26 -05:00
committed by Tim Graham
parent a2c3c2a1e2
commit 0894643e40
5 changed files with 75 additions and 15 deletions

View File

@@ -288,6 +288,7 @@ class ChildInline(admin.StackedInline):
class ParentAdmin(admin.ModelAdmin):
model = Parent
inlines = [ChildInline]
save_as = True
list_editable = ('name',)