Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mager committed May 26, 2024
1 parent eb3d803 commit 2c71f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions mage_ai/data_preparation/models/block/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,7 @@ def callback_block(self) -> 'CallbackBlock':
@property
def variable_manager(self) -> VariableManager:
if not self.pipeline:
raise Exception(
f'Block {self.uuid} requires a pipeline to access the variable manager'
)
return
return self.pipeline.variable_manager

@property
Expand Down Expand Up @@ -3685,7 +3683,7 @@ def aggregate_summary_info(self, execution_partition: Optional[str] = None):
don鈥檛 take forever to load while waiting for all the nested variable folders
to be read.
"""
if not VARIABLE_DATA_OUTPUT_META_CACHE:
if not VARIABLE_DATA_OUTPUT_META_CACHE or not self.variable_manager:
return

self.variable_manager.aggregate_summary_info_for_all_variables(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_execute_block(self):
env='test',
error_on_failure=True,
mage=1,
pipeline_uuid=None,
pipeline_uuid='',
poll_interval=10,
strategies=[HookStrategy.RAISE],
with_trigger=True,
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_execute_block_with_error(self):
env='test',
error_on_failure=True,
mage=1,
pipeline_uuid=None,
pipeline_uuid='',
poll_interval=10,
strategies=[HookStrategy.RAISE],
with_trigger=True,
Expand Down

0 comments on commit 2c71f4e

Please sign in to comment.