mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: upgrade black (#19410)
This commit is contained in:
@@ -104,14 +104,19 @@ class DashboardPermalinkRestApi(BaseApi):
|
||||
try:
|
||||
state = self.add_model_schema.load(request.json)
|
||||
key = CreateDashboardPermalinkCommand(
|
||||
actor=g.user, dashboard_id=pk, state=state,
|
||||
actor=g.user,
|
||||
dashboard_id=pk,
|
||||
state=state,
|
||||
).run()
|
||||
http_origin = request.headers.environ.get("HTTP_ORIGIN")
|
||||
url = f"{http_origin}/superset/dashboard/p/{key}/"
|
||||
return self.response(201, key=key, url=url)
|
||||
except (ValidationError, DashboardPermalinkInvalidStateError) as ex:
|
||||
return self.response(400, message=str(ex))
|
||||
except (DashboardAccessDeniedError, KeyValueAccessDeniedError,) as ex:
|
||||
except (
|
||||
DashboardAccessDeniedError,
|
||||
KeyValueAccessDeniedError,
|
||||
) as ex:
|
||||
return self.response(403, message=str(ex))
|
||||
except DashboardNotFoundError as ex:
|
||||
return self.response(404, message=str(ex))
|
||||
|
||||
Reference in New Issue
Block a user