Fix after rebase

This commit is contained in:
smilerz
2021-12-30 13:55:38 -06:00
parent 79b4bc387e
commit 582e145a9f
7 changed files with 57 additions and 59 deletions

View File

@@ -201,7 +201,10 @@ class InviteLinkCreate(GroupRequiredMixin, CreateView):
def form_valid(self, form):
obj = form.save(commit=False)
obj.created_by = self.request.user
obj.space = self.request.space
# verify given space is actually owned by the user creating the link
if obj.space.created_by != self.request.user:
obj.space = self.request.space
obj.save()
if obj.email:
try: