Skip to content

Commit

Permalink
regression: disabled models can ref other disabled models (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcarthur authored Mar 3, 2017
1 parent 12b0b55 commit 46912a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbt/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def do_ref(*args):

target_model_id = target_model.get('unique_id')

if target_model.get('config', {}) \
.get('enabled') is False:
if target_model.get('config', {}).get('enabled') is False and \
model.get('config', {}).get('enabled') is True:
compiler_error(
model,
"Model '{}' depends on model '{}' which is disabled in "
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{config(enabled=False)}}

select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{config(enabled=False)}}

select * from {{ref('disabled_one')}}

0 comments on commit 46912a8

Please sign in to comment.