mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(permalink): migrate to marshmallow codec (#24166)
This commit is contained in:
committed by
Elizabeth Thompson
parent
4b590f3f36
commit
f27cece69a
@@ -23,6 +23,7 @@ from superset.explore.permalink.commands.base import BaseExplorePermalinkCommand
|
||||
from superset.explore.permalink.exceptions import ExplorePermalinkCreateFailedError
|
||||
from superset.explore.utils import check_access as check_chart_access
|
||||
from superset.key_value.commands.create import CreateKeyValueCommand
|
||||
from superset.key_value.exceptions import KeyValueCodecEncodeException
|
||||
from superset.key_value.utils import encode_permalink_key
|
||||
from superset.utils.core import DatasourceType
|
||||
|
||||
@@ -58,6 +59,8 @@ class CreateExplorePermalinkCommand(BaseExplorePermalinkCommand):
|
||||
if key.id is None:
|
||||
raise ExplorePermalinkCreateFailedError("Unexpected missing key id")
|
||||
return encode_permalink_key(key=key.id, salt=self.salt)
|
||||
except KeyValueCodecEncodeException as ex:
|
||||
raise ExplorePermalinkCreateFailedError(str(ex)) from ex
|
||||
except SQLAlchemyError as ex:
|
||||
logger.exception("Error running create command")
|
||||
raise ExplorePermalinkCreateFailedError() from ex
|
||||
|
||||
Reference in New Issue
Block a user