You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/08/23 12:10:25 UTC
[superset] branch master updated: fix: Error when using the legacy dataset editor (#25057)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new c92a975e4b fix: Error when using the legacy dataset editor (#25057)
c92a975e4b is described below
commit c92a975e4b72962baf34d1fcbf2ee38011199377
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Wed Aug 23 09:10:17 2023 -0300
fix: Error when using the legacy dataset editor (#25057)
Co-authored-by: John Bodley <45...@users.noreply.github.com>
---
.pre-commit-config.yaml | 7 ++++---
superset/connectors/sqla/views.py | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 07544d66d2..9e0318456d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -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,
diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py
index bce647dcda..d79f5f6358 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -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"),
)
}