mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
code cleanup
This commit is contained in:
parent
99ee0f8840
commit
af07068144
3 changed files with 3 additions and 11 deletions
|
@ -43,6 +43,7 @@ class Recipe(BaseModel):
|
|||
recipeIngredient: Optional[list[str]]
|
||||
recipeInstructions: Optional[list[RecipeStep]]
|
||||
nutrition: Optional[Nutrition]
|
||||
tools: Optional[list[str]] = []
|
||||
|
||||
totalTime: Optional[str] = None
|
||||
prepTime: Optional[str] = None
|
||||
|
@ -67,6 +68,7 @@ class Recipe(BaseModel):
|
|||
"recipeIngredient": [x.ingredient for x in name_orm.recipeIngredient],
|
||||
"recipeCategory": [x.name for x in name_orm.recipeCategory],
|
||||
"tags": [x.name for x in name_orm.tags],
|
||||
"tools": [x.tool for x in name_orm.tools],
|
||||
"extras": {x.key_name: x.value for x in name_orm.extras},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class WebhookJob(BaseModel):
|
||||
webhook_urls: list[str] = []
|
||||
webhook_time: str = "00:00"
|
||||
webhook_enable: bool
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
|
@ -7,7 +7,7 @@ from sqlalchemy.orm.session import Session
|
|||
|
||||
|
||||
def post_webhooks(group: int, session: Session = None):
|
||||
session = session if session else create_session()
|
||||
session = session or create_session()
|
||||
group_settings: GroupInDB = db.groups.get(session, group)
|
||||
|
||||
if not group_settings.webhook_enable:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue