avoid the extra SELECT
This commit is contained in:
parent
bb2ffd2df0
commit
aad54984c5
1 changed files with 2 additions and 3 deletions
|
@ -48,6 +48,5 @@ class TeamInvitationForm(forms.Form):
|
||||||
Membership.objects.create(team=self.team, user=self.user, state="invited")
|
Membership.objects.create(team=self.team, user=self.user, state="invited")
|
||||||
elif self.state == "applied":
|
elif self.state == "applied":
|
||||||
# if they applied we shortcut invitation process
|
# if they applied we shortcut invitation process
|
||||||
membership = Membership.objects.get(team=self.team, user=self.user)
|
membership = Membership.objects.filter(team=self.team, user=self.user)
|
||||||
membership.state = "member"
|
membership.update(state="member")
|
||||||
membership.save()
|
|
||||||
|
|
Loading…
Reference in a new issue