Skip to content

Commit

Permalink
Store tools as a set of strings (#365)
Browse files Browse the repository at this point in the history
As noted the get_stored_tools(), StoredState cannot store arbitrary
objects; this commit applies the same logic to _on_redetect_hardware()

Fixes: #364
  • Loading branch information
aieri authored Dec 11, 2024
1 parent 40d793d commit f8afe0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _on_redetect_hardware(self, event: ops.ActionEvent) -> None:

if event.params["apply"] and hw_change_detected:
# Update the value in local Store
self._stored.stored_tools = available_tools
self._stored.stored_tools = {tool.value for tool in available_tools}
event.log(f"Run install hook with enable tools: {sorted_available_tools}")
self._on_install_or_upgrade(event=event)

Expand Down

0 comments on commit f8afe0e

Please sign in to comment.