mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-03 22:43:11 -05:00
remove potentially sensitive fields from group self
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user