sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

@@ -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