diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index b5bfe1ffda3bf..237a71ab7b76a 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -920,6 +920,7 @@ def data(self) -> Dict[str, Any]: data_["is_sqllab_view"] = self.is_sqllab_view data_["health_check_message"] = self.health_check_message data_["extra"] = self.extra + data_["owners"] = self.owners_data return data_ @property diff --git a/tests/integration_tests/datasource_tests.py b/tests/integration_tests/datasource_tests.py index 6c8ae672c5845..8e4d269b20126 100644 --- a/tests/integration_tests/datasource_tests.py +++ b/tests/integration_tests/datasource_tests.py @@ -290,6 +290,8 @@ def test_save(self): self.compare_lists(datasource_post[k], resp[k], "metric_name") elif k == "database": self.assertEqual(resp[k]["id"], datasource_post[k]["id"]) + elif k == "owners": + self.assertEqual([o["id"] for o in resp[k]], datasource_post["owners"]) else: print(k) self.assertEqual(resp[k], datasource_post[k])