chore: Fix TableModelView super call (#11815)

This commit is contained in:
John Bodley 2020-11-26 11:37:42 +13:00 committed by GitHub
parent 9c69679e14
commit 13c51d5211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,9 +481,9 @@ class TableModelView( # pylint: disable=too-many-ancestors
@expose("/edit/<pk>", methods=["GET", "POST"])
@has_access
def edit(self, pk: int) -> FlaskResponse:
def edit(self, pk: str) -> FlaskResponse:
"""Simple hack to redirect to explore view after saving"""
resp = super(TableModelView, self).edit(pk)
resp = super().edit(pk)
if isinstance(resp, str):
return resp
return redirect("/superset/explore/table/{}/".format(pk))