Skip to content

Commit

Permalink
bugfix: in NMBaseModel.validate() method, change model_validate() for…
Browse files Browse the repository at this point in the history
… model_validate_string() which correctly interprets the string keys produced by model_dump() as member variables
  • Loading branch information
toni-neurosc committed Nov 8, 2024
1 parent 56d7806 commit 34a4412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py_neuromodulation/utils/pydantic_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __repr__(self):
return pformat(self.model_dump())

def validate(self) -> Any: # type: ignore
return self.model_validate(self.model_dump())
return self.model_validate_strings(self.model_dump())

def __getitem__(self, key):
return getattr(self, key)
Expand Down

0 comments on commit 34a4412

Please sign in to comment.