blueprints: Support nested custom tags in !Find and !Format tags (#4127)

* Added support for nested tags to !Find and !Format

* Added tests

* Fix variable names

* Added docs

* Fixed small mistake in tests

* Fixed variable names

* Broke example into multiple lines
This commit is contained in:
sdimovv
2022-12-01 15:10:26 +00:00
committed by GitHub
parent 3251bdc220
commit 1f7d52c5ce
4 changed files with 55 additions and 8 deletions

View File

@ -10,7 +10,19 @@ If no matching entry can be found, an error is raised and the blueprint is inval
#### `!Find`
Example: `configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]`
Examples:
`configure_flow: !Find [authentik_flows.flow, [slug, default-password-change]]`
```
configure_flow: !Find [
authentik_flows.flow,
[
!Context property_name,
!Context property_value
]
]
```
Looks up any model and resolves to the the matches' primary key.
First argument is the model to be queried, remaining arguments are expected to be pairs of key=value pairs to query for.