main: do not create bot as user in sync_members_as_active_users()

This commit is contained in:
lemoer 2024-12-21 05:40:20 +01:00
parent 864714db6d
commit 947f31ad96

View File

@ -191,11 +191,12 @@ class LabCleaningBot:
return Ok(other_members)
def sync_members_as_active_users(self, session) -> Result[None, str]:
group = self.api.get_group(self.base_group)
if group.is_err():
return Err(group.unwrap_err())
maybe_members = self.get_other_members()
members = group.unwrap().members
if is_err(maybe_members):
return Err(maybe_members.unwrap_err())
members = maybe_members.unwrap()
for member in members:
maybe_user = get_user_by_name(session, member, only_active=False)