You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2022/12/13 23:55:35 UTC

[superset] branch master updated: chore: show database UUID in API (#22411)

This is an automated email from the ASF dual-hosted git repository.

beto 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 481b020e9d chore: show database UUID in API (#22411)
481b020e9d is described below

commit 481b020e9d4a4f0e5c6daba65c11eb7515c25ff8
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Tue Dec 13 15:55:27 2022 -0800

    chore: show database UUID in API (#22411)
---
 superset/databases/api.py                      | 2 ++
 tests/integration_tests/databases/api_tests.py | 1 +
 2 files changed, 3 insertions(+)

diff --git a/superset/databases/api.py b/superset/databases/api.py
index aced8e7c6f..3f737ec4da 100644
--- a/superset/databases/api.py
+++ b/superset/databases/api.py
@@ -115,6 +115,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
     base_filters = [["id", DatabaseFilter, lambda: []]]
     show_columns = [
         "id",
+        "uuid",
         "database_name",
         "cache_timeout",
         "expose_in_sqllab",
@@ -157,6 +158,7 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
         "extra",
         "force_ctas_schema",
         "id",
+        "uuid",
         "disable_data_preview",
         "engine_information",
     ]
diff --git a/tests/integration_tests/databases/api_tests.py b/tests/integration_tests/databases/api_tests.py
index 9698c7e42a..8a96184b81 100644
--- a/tests/integration_tests/databases/api_tests.py
+++ b/tests/integration_tests/databases/api_tests.py
@@ -201,6 +201,7 @@ class TestDatabaseApi(SupersetTestCase):
             "extra",
             "force_ctas_schema",
             "id",
+            "uuid",
         ]
 
         self.assertGreater(response["count"], 0)