fix: set importer as owner (#16656)

* fix: set importer as owner

* Fix tests
This commit is contained in:
Beto Dealmeida
2021-09-15 12:27:02 -07:00
committed by GitHub
parent 86290cc0e5
commit 092ef5bdfc
9 changed files with 55 additions and 5 deletions

View File

@@ -1715,6 +1715,9 @@ class TestChartApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixin):
chart = db.session.query(Slice).filter_by(uuid=chart_config["uuid"]).one()
assert chart.table == dataset
chart.owners = []
dataset.owners = []
database.owners = []
db.session.delete(chart)
db.session.delete(dataset)
db.session.delete(database)
@@ -1784,6 +1787,9 @@ class TestChartApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixin):
dataset = database.tables[0]
chart = db.session.query(Slice).filter_by(uuid=chart_config["uuid"]).one()
chart.owners = []
dataset.owners = []
database.owners = []
db.session.delete(chart)
db.session.delete(dataset)
db.session.delete(database)