Update dependencies and fix deprecations

This commit is contained in:
Lexi / Zoe 2022-09-17 16:42:38 +02:00
parent 0d4fbef13d
commit 19d264a03b
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
8 changed files with 154 additions and 131 deletions

View file

@ -10,7 +10,7 @@ __all__ = [
]
@as_declarative(name='BaseModel', metadata=MetaData())
@as_declarative(metadata=MetaData())
class BaseModel:
"""
Declarative base class for database models.
@ -46,9 +46,9 @@ class BaseModel:
"""
Return the object's data as a dictionary.
By default, the dictionary will contain all table columns (with their column name as key) defined in the model. This can be
overridden by setting the `fields` and/or `exclude` parameters, in which case only fields that are listed in `fields` will be
included in the dictionary, except for fields listed in `exclude`.
By default, the dictionary will contain all table columns (with their column name as key) defined in the model.
This can be overridden by setting the `fields` and/or `exclude` parameters, in which case only fields that are
listed in `fields` will be included in the dictionary, except for fields listed in `exclude`.
"""
# Determine fields to include in dictionary (starting will all table columns)
included_fields = set(column.name for column in self.__table__.columns)