Skip to content

Commit

Permalink
Merge pull request #121 from stat-kwon/master
Browse files Browse the repository at this point in the history
Add handling for cases where dataframe is None
  • Loading branch information
stat-kwon authored Dec 16, 2024
2 parents e1d46df + 910a937 commit 265a8b2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def load_from_widget(

def make_cache_data(self, granularity, start, end, vars) -> None:
cache_key = f"dashboard:Widget:load:{granularity}:{start}:{end}:{vars}:{self.widget_id}:{self.domain_id}"
if not cache.get(cache_key):
if not cache.get(cache_key) and self.df is not None:
cache.set(
cache_key,
self.df.to_dict(orient="records"),
Expand Down

0 comments on commit 265a8b2

Please sign in to comment.