Review updates
This commit is contained in:
parent
7ca853adee
commit
f15b3f345e
2 changed files with 5 additions and 5 deletions
|
@ -330,8 +330,8 @@ def add_or_invite_to_team(inviter, team, user=None, email=None):
|
|||
add_user_to_team(user, team)
|
||||
return None
|
||||
|
||||
return TeamMemberInvite.create(user=user, email=email if not user else None, team=team,
|
||||
inviter=inviter)
|
||||
email_address = email if not user else None
|
||||
return TeamMemberInvite.create(user=user, email=email_address, team=team, inviter=inviter)
|
||||
|
||||
|
||||
def add_user_to_team(user, team):
|
||||
|
@ -1775,9 +1775,9 @@ def delete_matching_notifications(target, kind_name, **kwargs):
|
|||
kind_ref = NotificationKind.get(name=kind_name)
|
||||
|
||||
# Load all notifications for the user with the given kind.
|
||||
notifications = list(Notification.select().where(
|
||||
notifications = Notification.select().where(
|
||||
Notification.target == target,
|
||||
Notification.kind == kind_ref))
|
||||
Notification.kind == kind_ref)
|
||||
|
||||
# For each, match the metadata to the specified values.
|
||||
for notification in notifications:
|
||||
|
|
Reference in a new issue