Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Oct 5, 2021
1 parent a4aa3f4 commit a1efe3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
5 changes: 2 additions & 3 deletions superset/datasets/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ def validate(self) -> None:
exceptions.append(DatabaseChangeValidationError())
# Validate/Populate owner
try:
if owner_ids:
owners = self.populate_owners(self._actor, owner_ids)
self._properties["owners"] = owners
owners = self.populate_owners(self._actor, owner_ids)
self._properties["owners"] = owners
except ValidationError as ex:
exceptions.append(ex)

Expand Down
18 changes: 0 additions & 18 deletions tests/integration_tests/datasets/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,24 +657,6 @@ def test_update_dataset_item_w_override_columns(self):
db.session.delete(dataset)
db.session.commit()

def test_update_dataset_owners_kept(self):
"""
Dataset API: Test update dataset does not clear owners
"""
dataset = self.insert_default_dataset()

self.login(username="admin")
dataset_data = {"description": "Arash's metrics for a successful Series C"}
uri = f"api/v1/dataset/{dataset.id}"
rv = self.put_assert_metric(uri, dataset_data, "put")
assert rv.status_code == 200

model = db.session.query(SqlaTable).get(dataset.id)
assert model.owners == dataset.owners

db.session.delete(dataset)
db.session.commit()

def test_update_dataset_create_column(self):
"""
Dataset API: Test update dataset create column
Expand Down

0 comments on commit a1efe3f

Please sign in to comment.