From 2521417f64995f3e2f74cc6503ec959a12717f7c Mon Sep 17 00:00:00 2001 From: Andrew <15331990+ahuang11@users.noreply.github.com> Date: Wed, 24 Jan 2024 02:03:44 -0800 Subject: [PATCH] Fix update widget error (#515) --- lumen/pipeline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lumen/pipeline.py b/lumen/pipeline.py index 0f8ba8f52..357621e17 100644 --- a/lumen/pipeline.py +++ b/lumen/pipeline.py @@ -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() @@ -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