Skip to content

Commit

Permalink
πŸ› app bug
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Jan 25, 2024
1 parent 5196c0a commit 752f2a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lunchable/plugins/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ def refresh(
msg = f"Model not supported by Lunchable App: {model.__name__}"
raise NotImplementedError(msg) from e
fetched_data = fetch_data_function()
if isinstance(model, UserObject):
if isinstance(fetched_data, UserObject):
data_mapping = fetched_data
else:
data_mapping = {item.id: item for item in fetched_data}
data_mapping = {item.id: item for item in fetched_data} # type: ignore[assignment]
setattr(self.data, attr_name, data_mapping)
return data_mapping

Expand Down

0 comments on commit 752f2a3

Please sign in to comment.