Skip to content

Commit

Permalink
Set empty nodes to null instead of empty object, {} (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgrady authored Sep 9, 2022
1 parent 4d4e486 commit b5a4fec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deploy/scripts/semantic_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def to_json(self) -> str:
"lang": self.lang,
"name": self.name,
"id": self.id,
"parent": {} if self.parent is None else self.parent.to_dict(),
"prev": {} if self.prev is None else self.prev.to_dict(),
"next": {} if self.next is None else self.next.to_dict(),
"parent": None if self.parent is None else self.parent.to_dict(),
"prev": None if self.prev is None else self.prev.to_dict(),
"next": None if self.next is None else self.next.to_dict(),
"children": children,
}
return json.dumps(data, indent=4)

0 comments on commit b5a4fec

Please sign in to comment.