Rename __json__() to asdict()

This commit is contained in:
grossmj committed 2021-04-17 23:34:28 +09:30
1 parent 44074ff7c9
commit cefab8d362
89 files changed
+286 -282

No files matched your search

+2 -2
View File
@@ -193,13 +193,13 @@ class Drawing:
# To avoid spamming client with large data we don't send the svg if the SVG didn't change
svg_changed = True
setattr(self, prop, kwargs[prop])
data = self.__json__()
data = self.asdict()
if not svg_changed:
del data["svg"]
self._project.emit_notification("drawing.updated", data)
self._project.dump()
def __json__(self, topology_dump=False):
def asdict(self, topology_dump=False):
"""
:param topology_dump: Filter to keep only properties require for saving on disk
"""