mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 07:39:41 +02: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:
parent
cfaac2e060
commit
3e3b43c977
5 changed files with 96 additions and 30 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue