sync update from LAN repo (source dhk-1 @ 3b1ec5b4)
This commit is contained in:
1 parent
da6521b6cb
commit
264e2200d6
995 files changed
+148105
-13399
No files matched your search
+9
@@ -7,6 +7,15 @@ from typing import Any
|
||||
|
||||
|
||||
class PositionStore(ABC):
|
||||
async def get_effective_position(self, user_id: str) -> dict[str, Any] | None:
|
||||
"""Return an assigned position or the default without membership counts."""
|
||||
position_id = await self.get_user_position_id(user_id)
|
||||
record = await self.get_position(position_id) if position_id else None
|
||||
if record is None:
|
||||
default_id = await self.get_default_position_id()
|
||||
record = await self.get_position(default_id) if default_id else None
|
||||
return record
|
||||
|
||||
# -------------------------------------------------------------- positions
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in new issue
Block a user