Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #308 from malabikas/patch-3
Browse files Browse the repository at this point in the history
Retains end date in event edit on erroneus entry
  • Loading branch information
tapaswenipathak committed Apr 29, 2016
2 parents c7b8123 + 3aef004 commit 78eed01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vms/event/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def edit(request, event_id):
form.save()
return HttpResponseRedirect(reverse('event:list'))
else:
data = request.POST.copy()
data['end_date'] = form.cleaned_data['end_date']
form = EventForm(data)
return render(request, 'event/edit.html', {'form': form, })
else:
form = EventForm(instance=event)
Expand Down

0 comments on commit 78eed01

Please sign in to comment.