fix using deprecated SQLAlchemy mapping access
This commit is contained in:
parent
eb76ab1867
commit
496c51402a
3 changed files with 11 additions and 9 deletions
|
|
@ -10,6 +10,7 @@ from typing import (
|
|||
ClassVar,
|
||||
Container,
|
||||
Literal,
|
||||
Mapping,
|
||||
Type,
|
||||
TypeVar,
|
||||
Union,
|
||||
|
|
@ -144,7 +145,7 @@ def asplain(
|
|||
return d
|
||||
|
||||
|
||||
def fromplain(cls: Type[T], d: dict[str, Any], *, serialized: bool = False) -> T:
|
||||
def fromplain(cls: Type[T], d: Mapping, *, serialized: bool = False) -> T:
|
||||
"""Return an instance of the given model using the given data.
|
||||
|
||||
If `serialized` is `True`, collection types (lists, dicts, etc.) will be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue