diff --git a/main.py b/main.py index a98326e..cf404ce 100644 --- a/main.py +++ b/main.py @@ -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)