fix: Error when using the legacy dataset editor (#25057)

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
This commit is contained in:
Michael S. Molina 2023-08-23 09:10:17 -03:00 committed by GitHub
parent 60889d27ed
commit c92a975e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -42,12 +42,13 @@ repos:
hooks:
- id: mypy
args: [--check-untyped-defs]
additional_dependencies:
[
additional_dependencies: [
types-simplejson,
types-python-dateutil,
types-requests,
types-redis,
# types-redis 4.6.0.5 is failing mypy
# because of https://github.com/python/typeshed/pull/10531
types-redis==4.6.0.4,
types-pytz,
types-croniter,
types-PyYAML,

View File

@ -411,6 +411,7 @@ class TableModelView( # pylint: disable=too-many-ancestors
"database": QuerySelectField(
"Database",
query_func=lambda: db.session.query(models.Database),
get_pk_func=lambda item: item.id,
widget=Select2Widget(extra_classes="readonly"),
)
}