Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CATCH op #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: add CATCH op #82

wants to merge 1 commit into from

Conversation

ooga
Copy link

@ooga ooga commented Nov 9, 2024

This let us handle cases where we have model with an optional relation.

Example with a recursive model

page

- slug (Type: String)
- parent (Type: M2O)

This expression doesn't work when parent is not set
{{ IF(NOT_NULL(parent), parent.slug, "") }}

With the CATCH it works and the expression is simpler
{{ CATCH(parent.slug, "") }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant