dimagi/jsonobject

More nuanced way to determine whether to manage a dynamic property

Opened this issue · 0 comments

Setting an attribute to a function should not crash, and overwriting an existing method should not create a managed property.

Example: if Foo has a save method then both of the following should be fine, where foo = Foo():

# to_json() shouldn't include "save": None
foo.save = None

# shouldn't crash
foo.save = lambda self: None