mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Fix: public widget serializer was referncing wrong name
This commit is contained in:
parent
8a41328033
commit
c2a9e2e960
@ -19,7 +19,7 @@ def public_widget(widget):
|
||||
}
|
||||
|
||||
if widget.visualization and widget.visualization.id:
|
||||
query_data = models.QueryResult.query.get(widget.visualization.query.latest_query_data_id).to_dict()
|
||||
query_data = models.QueryResult.query.get(widget.visualization.query_rel.latest_query_data_id).to_dict()
|
||||
res['visualization'] = {
|
||||
'type': widget.visualization.type,
|
||||
'name': widget.visualization.name,
|
||||
@ -29,8 +29,8 @@ def public_widget(widget):
|
||||
'created_at': widget.visualization.created_at,
|
||||
'query': {
|
||||
'query': ' ', # workaround, as otherwise the query data won't be loaded.
|
||||
'name': widget.visualization.query.name,
|
||||
'description': widget.visualization.query.description,
|
||||
'name': widget.visualization.query_rel.name,
|
||||
'description': widget.visualization.query_rel.description,
|
||||
'options': {},
|
||||
'latest_query_data': query_data
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user