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

get_model_object is undefined #1

Open
wallygator470 opened this issue Oct 23, 2023 · 1 comment
Open

get_model_object is undefined #1

wallygator470 opened this issue Oct 23, 2023 · 1 comment

Comments

@wallygator470
Copy link

Where does this macro live or what are you using for it? I am trying to see how this works and this is the blocker right now.

@Chasic
Copy link
Contributor

Chasic commented Nov 22, 2023

@wallygator470 yeah sorry for that, it's part of different set of macros, I will update the code but you can use this one:

{% macro get_model_object(model_name) %}

    {% if execute %}
        {% for node in graph.nodes.values() -%}
            {%- if node.name == model_name -%}
                {{ return(node) }}
            {%- endif -%}
        {%- endfor %}

    {%- endif -%}

    {{ return(none) }}
{% endmacro %}

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

No branches or pull requests

2 participants