Rename the method so it doesn't shadow the model method.
This commit is contained in:
parent
d5027d2383
commit
7ca853adee
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ from data import model
|
||||||
from util.useremails import send_org_invite_email
|
from util.useremails import send_org_invite_email
|
||||||
from util.gravatar import compute_hash
|
from util.gravatar import compute_hash
|
||||||
|
|
||||||
def add_or_invite_to_team(inviter, team, user=None, email=None):
|
def handle_addinvite_team(inviter, team, user=None, email=None):
|
||||||
invite = model.add_or_invite_to_team(inviter, team, user, email)
|
invite = model.add_or_invite_to_team(inviter, team, user, email)
|
||||||
if not invite:
|
if not invite:
|
||||||
# User was added to the team directly.
|
# User was added to the team directly.
|
||||||
|
@ -205,7 +205,7 @@ class TeamMember(ApiResource):
|
||||||
|
|
||||||
# Add or invite the user to the team.
|
# Add or invite the user to the team.
|
||||||
inviter = get_authenticated_user()
|
inviter = get_authenticated_user()
|
||||||
invite = add_or_invite_to_team(inviter, team, user=user)
|
invite = handle_addinvite_team(inviter, team, user=user)
|
||||||
if not invite:
|
if not invite:
|
||||||
log_action('org_add_team_member', orgname, {'member': membername, 'team': teamname})
|
log_action('org_add_team_member', orgname, {'member': membername, 'team': teamname})
|
||||||
return member_view(user, invited=False)
|
return member_view(user, invited=False)
|
||||||
|
|
Reference in a new issue