Skip to content

Commit

Permalink
Fix update widget error (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored Jan 24, 2024
1 parent 39f291d commit 2521417
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lumen/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def __init__(self, *, source, table, schema=None, filters=None, **params):
filters = []
if any(isinstance(t, SQLTransform) for t in params.get('transforms', [])):
raise TypeError('Pipeline.transforms must be regular Transform components, not SQLTransform.')
self._update_widget = None
super().__init__(source=source, table=table, filters=filters, schema=schema, **params)
self._update_widget = pn.Param(self.param['update'], widgets={'update': {'button_type': 'success'}})[0]
self._init_callbacks()
Expand Down Expand Up @@ -288,7 +289,7 @@ def _compute_data(self):

@catch_and_notify
def _update_data(self, *events: param.parameterized.Event, force: bool = False):
if self._update_widget.loading:
if self._update_widget is None or self._update_widget.loading:
return
if not force and not self.auto_update and not self.update:
self._stale = True
Expand Down

0 comments on commit 2521417

Please sign in to comment.