Skip to content

Commit e38f51c

Browse files
fix: preserve min_value=0 by bypassing get_test_argument truthy check
get_test_argument uses `{% if value %}` which treats 0 as falsy, silently dropping min_value=0. Guard with an explicit `is none` check so that 0 is preserved as a valid threshold value. Ref: elementary-data/elementary#2177 Made-with: Cursor
1 parent 41e6e38 commit e38f51c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

macros/edr/tests/test_configuration/get_anomalies_test_configuration.sql

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@
9595
} %}
9696
{%- endif %}
9797

98-
{%- set min_value = elementary.get_test_argument(
99-
"min_value", min_value, model_graph_node
100-
) %}
98+
{%- if min_value is none %}
99+
{%- set min_value = elementary.get_test_argument(
100+
"min_value", none, model_graph_node
101+
) %}
102+
{%- endif %}
101103

102104
{% set anomaly_exclude_metrics = elementary.get_test_argument(
103105
"anomaly_exclude_metrics", anomaly_exclude_metrics, model_graph_node

0 commit comments

Comments
 (0)