From 2bb7ea5561a67cf2b1aa84d8c9a965721faf04af Mon Sep 17 00:00:00 2001 From: Carl van Tonder Date: Tue, 29 May 2018 23:16:22 -0400 Subject: [PATCH] Set CaseStudy.author --- apps/map/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/map/views.py b/apps/map/views.py index 1c9fa7f..d91bd03 100644 --- a/apps/map/views.py +++ b/apps/map/views.py @@ -77,6 +77,9 @@ class BaseForm(LoginRequiredMixin, CreateView): 'shapefiles_files', [] ) + self.object.author = self.request.user + self.object.save() + self.send_email() # Delete the corresponding draft