From 12d40577145f45d2ccd7df12cd9018d0860771ea Mon Sep 17 00:00:00 2001 From: Rose Xi Date: Thu, 24 Sep 2020 15:32:55 -0700 Subject: [PATCH] Set inviter in SendJSONInvite --- invitations/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invitations/views.py b/invitations/views.py index 58c5713..0fb7523 100644 --- a/invitations/views.py +++ b/invitations/views.py @@ -85,6 +85,8 @@ def post(self, request, *args, **kwargs): response['invalid'].append( {invitee: 'user registered email'}) else: + invite.inviter = self.request.user + invite.save() invite.send_invitation(request) response['valid'].append({invitee: 'invited'})