🐛 (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:
parent
dbb816abf9
commit
80c3d5a1da
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue