remove potentially sensitive fields from group self

This commit is contained in:
Michael Genson
2024-03-15 19:50:39 +00:00
parent b6ccb9fbdb
commit 52c6fe34b2
5 changed files with 29 additions and 7 deletions

View File

@@ -249,6 +249,21 @@ class GroupInDB(UpdateGroup):
]
class GroupSummary(MealieModel):
id: UUID4
name: str
slug: str
preferences: ReadGroupPreferences | None = None
model_config = ConfigDict(from_attributes=True)
@classmethod
def loader_options(cls) -> list[LoaderOption]:
return [
joinedload(Group.preferences),
]
class GroupPagination(PaginationBase):
items: list[GroupInDB]