fix: return slice owners for /user_slices ep (#10171)

* fix: return slice wowners for /user_slices ep

* put back created_by and changed_by

* improve comment
This commit is contained in:
Ville Brofeldt
2020-06-26 18:10:56 +03:00
committed by GitHub
parent ffefcd9ad4
commit 410c5be2f8
3 changed files with 61 additions and 14 deletions

View File

@@ -149,9 +149,12 @@ class SupersetTestCase(TestCase):
resp = self.get_resp("/login/", data=dict(username=username, password=password))
self.assertNotIn("User confirmation needed", resp)
def get_slice(self, slice_name: str, session: Session) -> Slice:
def get_slice(
self, slice_name: str, session: Session, expunge_from_session: bool = True
) -> Slice:
slc = session.query(Slice).filter_by(slice_name=slice_name).one()
session.expunge_all()
if expunge_from_session:
session.expunge_all()
return slc
@staticmethod