mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
chore(key-value): use json serialization for main resources (#23888)
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import json
|
||||
import pickle
|
||||
from typing import Any, Dict, Iterator
|
||||
from uuid import uuid3
|
||||
|
||||
@@ -24,7 +23,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from superset import db
|
||||
from superset.key_value.models import KeyValueEntry
|
||||
from superset.key_value.types import KeyValueResource
|
||||
from superset.key_value.types import JsonKeyValueCodec, KeyValueResource
|
||||
from superset.key_value.utils import decode_permalink_id, encode_permalink_key
|
||||
from superset.models.slice import Slice
|
||||
from superset.utils.core import DatasourceType
|
||||
@@ -95,7 +94,7 @@ def test_get_missing_chart(
|
||||
chart_id = 1234
|
||||
entry = KeyValueEntry(
|
||||
resource=KeyValueResource.EXPLORE_PERMALINK,
|
||||
value=pickle.dumps(
|
||||
value=JsonKeyValueCodec().encode(
|
||||
{
|
||||
"chartId": chart_id,
|
||||
"datasourceId": chart.datasource.id,
|
||||
|
||||
Reference in New Issue
Block a user