You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/10 12:31:31 UTC

[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #10823: fix: Making the database/cluster read-only

dpgaspar commented on a change in pull request #10823:
URL: https://github.com/apache/incubator-superset/pull/10823#discussion_r486276012



##########
File path: superset/connectors/sqla/views.py
##########
@@ -160,7 +160,7 @@ class TableColumnInlineView(  # pylint: disable=too-many-ancestors
     add_form_extra_fields = {
         "table": QuerySelectField(
             "Table",
-            query_factory=lambda: db.session().query(models.SqlaTable),
+            query_factory=lambda: db.session.query(models.SqlaTable),

Review comment:
       nice catch!

##########
File path: superset/connectors/druid/views.py
##########
@@ -333,6 +334,16 @@ class DruidDatasourceModelView(DatasourceModelView, DeleteMixin, YamlExportMixin
         "changed_by_": _("Changed By"),
         "modified": _("Modified"),
     }
+    edit_form_extra_fields = {
+        "cluster": QuerySelectField(
+            "Cluster",
+            query_factory=lambda: db.session.query(models.DruidCluster),
+            widget=Select2Widget(extra_classes="readonly"),

Review comment:
       I'll make a patch release for FAB to make the `readonly` work again
   https://github.com/dpgaspar/Flask-AppBuilder/pull/1467
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org