🐛 (data.py): fix issue where setting a model field value was not updating the data dictionary in the Data class

This commit is contained in:
ogabrielluiz 2024-06-18 18:36:15 -03:00
commit 80c3d5a1da

View file

@ -167,6 +167,9 @@ class Data(BaseModel):
"""
if key in {"data", "text_key"} or key.startswith("_"):
super().__setattr__(key, value)
elif key in self.model_fields:
self.data[key] = value
super().__setattr__(key, value)
else:
self.data[key] = value