apply link redirect to edit-form, if it was a new form

This commit is contained in:
Oskar Hahn 2011-09-03 18:35:19 +02:00
parent ad263ea6a0
commit 4639e77549

View File

@ -217,6 +217,8 @@ def edit(request, item_id=None, form='ItemText', default=None):
item.application.writelog(_('Agenda item modified'), request.user) item.application.writelog(_('Agenda item modified'), request.user)
if not 'apply' in request.POST: if not 'apply' in request.POST:
return redirect(reverse('item_overview')) return redirect(reverse('item_overview'))
if item_id is None:
return redirect(reverse('item_edit', args=[item.id]))
else: else:
messages.error(request, _('Please check the form for errors.')) messages.error(request, _('Please check the form for errors.'))
else: else: