better model inheritance

This commit is contained in:
Michael Genson 2024-03-15 19:57:57 +00:00
parent 52c6fe34b2
commit ad0ea09be9

View File

@ -249,14 +249,12 @@ class GroupInDB(UpdateGroup):
] ]
class GroupSummary(MealieModel): class GroupSummary(GroupBase):
id: UUID4 id: UUID4
name: str name: str
slug: str slug: str
preferences: ReadGroupPreferences | None = None preferences: ReadGroupPreferences | None = None
model_config = ConfigDict(from_attributes=True)
@classmethod @classmethod
def loader_options(cls) -> list[LoaderOption]: def loader_options(cls) -> list[LoaderOption]:
return [ return [