se crea legal monetary total

FossilOrigin-Name: 8ae3dfadfe9b90b8cc5ad59d2a73f4c8a987c5aac498573e56754a2d32e9e2ae
This commit is contained in:
bit4bit
2021-06-27 02:16:16 +00:00
parent 2e8aa35b29
commit 507ddbe558
5 changed files with 94 additions and 12 deletions

View File

@@ -17,9 +17,10 @@ class _RelationProxy():
def __setattr__(self, attr, value):
# TODO(bit4bit) hacemos proxy al sistema de notificacion de cambios
# algo burdo, se usa __dict__ para saltarnos el __getattr__ y generar un fallo por recursion
response = setattr(self._obj, attr, value)
for fun in self.__dict__['_inst']._on_change_fields[self.__dict__['_attribute']]:
fun(self.__dict__['_inst'], self.__dict__['_attribute'], value)
return setattr(self._obj, attr, value)
return response
class _Relation():
def __init__(self, creator, inst, attribute):