main: do not create bot as user in sync_members_as_active_users()
This commit is contained in:
parent
864714db6d
commit
947f31ad96
9
main.py
9
main.py
@ -191,11 +191,12 @@ class LabCleaningBot:
|
|||||||
return Ok(other_members)
|
return Ok(other_members)
|
||||||
|
|
||||||
def sync_members_as_active_users(self, session) -> Result[None, str]:
|
def sync_members_as_active_users(self, session) -> Result[None, str]:
|
||||||
group = self.api.get_group(self.base_group)
|
maybe_members = self.get_other_members()
|
||||||
if group.is_err():
|
|
||||||
return Err(group.unwrap_err())
|
|
||||||
|
|
||||||
members = group.unwrap().members
|
if is_err(maybe_members):
|
||||||
|
return Err(maybe_members.unwrap_err())
|
||||||
|
|
||||||
|
members = maybe_members.unwrap()
|
||||||
|
|
||||||
for member in members:
|
for member in members:
|
||||||
maybe_user = get_user_by_name(session, member, only_active=False)
|
maybe_user = get_user_by_name(session, member, only_active=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user