diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index fd516cb..834107c 100644
a
|
b
|
class ModelAdmin(BaseModelAdmin):
|
1190 | 1190 | if obj is None: |
1191 | 1191 | raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_text(opts.verbose_name), 'key': escape(object_id)}) |
1192 | 1192 | |
1193 | | if request.method == 'POST' and "_saveasnew" in request.POST: |
1194 | | return self.add_view(request, form_url=reverse('admin:%s_%s_add' % |
1195 | | (opts.app_label, opts.model_name), |
1196 | | current_app=self.admin_site.name)) |
1197 | | |
1198 | 1193 | ModelForm = self.get_form(request, obj) |
1199 | 1194 | formsets = [] |
1200 | 1195 | inline_instances = self.get_inline_instances(request, obj) |
1201 | 1196 | if request.method == 'POST': |
1202 | 1197 | form = ModelForm(request.POST, request.FILES, instance=obj) |
1203 | 1198 | if form.is_valid(): |
| 1199 | if "_saveasnew" in request.POST: |
| 1200 | return self.add_view(request, form_url=reverse('admin:%s_%s_add' % |
| 1201 | (opts.app_label, opts.model_name), |
| 1202 | current_app=self.admin_site.name)) |
| 1203 | |
1204 | 1204 | form_validated = True |
1205 | 1205 | new_object = self.save_form(request, form, change=True) |
1206 | 1206 | else: |