Skip to content

Commit

Permalink
database:base - fix Cursor.fetchall() behaviour with models
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Oct 30, 2023
1 parent c040b63 commit d688d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acacore/database/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def fetchall(self, model: Optional[Type[M]] = None) -> Generator[Union[dict[str,
if model:
return (
model.model_validate(
{c.alias or c.name: v for c, v in zip(select_columns, vs)},
{c.alias or c.name: c.from_entry(v) for c, v in zip(select_columns, vs)},
)
for vs in self.cursor.fetchall()
)
Expand Down

0 comments on commit d688d0f

Please sign in to comment.