Skip to content

Commit

Permalink
[sweep][py] do not send empyt text
Browse files Browse the repository at this point in the history
  • Loading branch information
aslpavel committed Apr 14, 2024
1 parent 6a999e7 commit 024507e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sweep/sweep/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def __repr__(self) -> str:

def to_json(self) -> dict[str, Any]:
"""Convert field to JSON"""
obj: dict[str, Any] = dict(text=self.text)
obj: dict[str, Any] = {}
if self.text:
obj["text"] = self.text
if not self.active:
obj["active"] = False
if self.glyph:
Expand Down

0 comments on commit 024507e

Please sign in to comment.