Skip to content

Commit

Permalink
do not send none type but specify exact type
Browse files Browse the repository at this point in the history
  • Loading branch information
AIIX committed Nov 15, 2022
1 parent d76ecc4 commit b3eaaec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ovos_utils/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,10 @@ def show_notification(self, content, action=None,
"""
if not self.bus:
raise RuntimeError("bus not set, did you call self.bind() ?")
if not callback_data:
# GUI does not accept NONE type when building models, send a empty dict
# Sending NONE will corrupt entries in the model
callback_data = {}
self.bus.emit(Message("ovos.notification.api.set",
data={
"sender": self.skill_id,
Expand Down

0 comments on commit b3eaaec

Please sign in to comment.