mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04:00
feat: add on mounted hook for bookmarklets (#1120)
* add utility type to hide Advanced items * add default text * fix #1115 and minor refactorings * generate types * hotfix: add validator to catch null vlaues
This commit is contained in:
@@ -17,6 +17,10 @@ class CreateCookBook(MealieModel):
|
||||
tags: list[TagBase] = []
|
||||
tools: list[RecipeTool] = []
|
||||
|
||||
@validator("public", always=True, pre=True)
|
||||
def validate_public(public: bool | None, values: dict) -> bool: # type: ignore
|
||||
return False if public is None else public
|
||||
|
||||
@validator("slug", always=True, pre=True)
|
||||
def validate_slug(slug: str, values): # type: ignore
|
||||
name: str = values["name"]
|
||||
|
||||
Reference in New Issue
Block a user