Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Holger Brunn <[email protected]>
  • Loading branch information
OdyX and hbrunn authored Nov 21, 2024
1 parent 7587cf0 commit 1c047bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth_oidc/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def _auth_oauth_signin(self, provider, validation, params):
):
if group_line._eval_expression(user, validation):
if group_line.group_id not in user.groups_id:
group_updates.append((Command.LINK, group_line.group_id.id))
group_updates.append(Command.link(group_line.group_id.id))
else:
if group_line.group_id in user.groups_id:
group_updates.append((Command.UNLINK, group_line.group_id.id))
group_updates.append(Command.unlink(group_line.group_id.id))
if group_updates:
user.write({"groups_id": group_updates})
return login

0 comments on commit 1c047bc

Please sign in to comment.