mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
[PR #11215/862fe79a backport][stable-12] fix ruff case SIM110 (#11217)
fix ruff case SIM110 (#11215)
* fix ruff case SIM110
* Update plugins/module_utils/xenserver.py
* add changelog frag
---------
(cherry picked from commit 862fe79a22)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -202,10 +202,7 @@ class GitLabGroup:
|
||||
|
||||
# check if the user is a member of the group
|
||||
def is_user_a_member(self, members, gitlab_user_id):
|
||||
for member in members:
|
||||
if member.id == gitlab_user_id:
|
||||
return True
|
||||
return False
|
||||
return any(member.id == gitlab_user_id for member in members)
|
||||
|
||||
# add user to a group
|
||||
def add_member_to_group(self, gitlab_user_id, gitlab_group_id, access_level):
|
||||
|
||||
Reference in New Issue
Block a user