fix cache loading string instead of parsing json

This commit is contained in:
Patrick Jentsch 2023-06-22 16:44:29 +02:00
parent 71013f1dc5
commit 1e33366820

View File

@ -54,7 +54,7 @@ def cqi_corpora_corpus_get_visualization_data(cqi_client: cqi.CQiClient, corpus_
visualization_data_file_path = os.path.join(corpus.path, 'cwb', 'visualization_data.json')
if os.path.exists(visualization_data_file_path):
with open(visualization_data_file_path, 'r') as f:
payload = f.read()
payload = json.load(f)
return {'code': 200, 'msg': 'OK', 'payload': payload}
cqi_corpus = cqi_client.corpora.get(corpus_name)
##########################################################################