Skip to content

Commit 3fb434e

Browse files
Correctly skipping constraints when there was a failure.
1 parent e03845a commit 3fb434e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
name: 'dbt_constraints'
3-
version: '1.0.3'
3+
version: '1.0.4'
44
config-version: 2
55

66
# These macros depend on the results and graph objects in dbt >=0.19.0

macros/create_constraints.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@
229229
{%- for res in results
230230
if res.node.config.materialized == "test"
231231
and res.node.unique_id == test_model.unique_id -%}
232-
{%- if not res.failures -%}
233-
{#- Set NORELY if we do not know if there is a test failure -#}
234-
{{ return('NORELY') }}
232+
{%- if res.failures == None -%}
233+
{#- Set '' if we do not know if there is a test failure -#}
234+
{{ return('') }}
235235
{%- elif res.failures > 0 -%}
236236
{#- Set NORELY if there is a test failure -#}
237237
{{ return('NORELY') }}

0 commit comments

Comments
 (0)