Clear event form on save

This commit is contained in:
Adam Goldsmith 2021-05-24 23:12:01 -04:00
parent 47f117abe6
commit eb0e58c9f4

View File

@ -34,6 +34,7 @@ def taskDetail(request, tool_slug, task_slug):
form = EventForm(request.POST, user=request.user, instance=event)
if form.is_valid():
form.save()
form = EventForm(user=request.user)
else:
form = EventForm(request.POST)
form.add_error(None, "Not authenticated: please login")