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 2026/03/27 12:44:18 UTC

(superset) branch master updated: fix(dataset): add email field to owners_data for Chart Explore path (#38836)

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 ac96f46c764 fix(dataset): add email field to owners_data for Chart Explore path (#38836)
ac96f46c764 is described below

commit ac96f46c76416d75e1403a37ff175be8f955b02b
Author: Krishna Chaitanya <kr...@gmail.com>
AuthorDate: Fri Mar 27 05:44:11 2026 -0700

    fix(dataset): add email field to owners_data for Chart Explore path (#38836)
---
 superset/connectors/sqla/models.py              |  1 +
 tests/unit_tests/connectors/sqla/models_test.py | 31 +++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index c48a222e382..050eee5e5a7 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -299,6 +299,7 @@ class BaseDatasource(
                 "last_name": o.last_name,
                 "username": o.username,
                 "id": o.id,
+                "email": o.email,
             }
             for o in self.owners
         ]
diff --git a/tests/unit_tests/connectors/sqla/models_test.py b/tests/unit_tests/connectors/sqla/models_test.py
index 9c4dd73997e..a8af52b2dfd 100644
--- a/tests/unit_tests/connectors/sqla/models_test.py
+++ b/tests/unit_tests/connectors/sqla/models_test.py
@@ -946,3 +946,34 @@ def test_data_for_slices_handles_missing_datasource(mocker: MockerFixture) -> No
     assert "columns" in result
     assert "metrics" in result
     assert "verbose_map" in result
+
+
+def test_owners_data_includes_email(mocker: MockerFixture) -> None:
+    """Test that the owners_data property includes the email field."""
+    database = mocker.MagicMock()
+
+    table = SqlaTable(
+        table_name="test_table",
+        database=database,
+        columns=[],
+        metrics=[],
+    )
+
+    mock_owner = mocker.MagicMock()
+    mock_owner.first_name = "John"
+    mock_owner.last_name = "Doe"
+    mock_owner.username = "johndoe"
+    mock_owner.id = 1
+    mock_owner.email = "john@example.com"
+
+    table.owners = [mock_owner]
+
+    owners_data = table.owners_data
+    assert len(owners_data) == 1
+    assert owners_data[0] == {
+        "first_name": "John",
+        "last_name": "Doe",
+        "username": "johndoe",
+        "id": 1,
+        "email": "john@example.com",
+    }