Update docs

This commit is contained in:
Mojix Coder
2022-02-01 10:28:11 +03:30
parent fc32001fe7
commit 0791e7cc4b
9 changed files with 38 additions and 28 deletions

View File

@ -56,9 +56,9 @@ assert post.categories[0] == news
### get_or_create
`get_or_create(**kwargs) -> Model`
`get_or_create(_defaults: Optional[Dict[str, Any]] = None, **kwargs) -> Tuple[Model, bool]`
Tries to get a row meeting the criteria and if NoMatch exception is raised it creates a new one with given kwargs.
Tries to get a row meeting the criteria and if NoMatch exception is raised it creates a new one with given kwargs and _defaults.
!!!tip
Read more in queries documentation [get_or_create][get_or_create]
@ -129,7 +129,7 @@ await post.categories.create(
### get_or_create
`get_or_create(**kwargs) -> Model`
`get_or_create(_defaults: Optional[Dict[str, Any]] = None, **kwargs) -> Tuple[Model, bool]`
Tries to get a row meeting the criteria and if NoMatch exception is raised it creates a new one with given kwargs.