We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bb8fa8 commit 3b0d82aCopy full SHA for 3b0d82a
sqlanalytics/api/wrapper.go
@@ -96,6 +96,23 @@ func (a Wrapper) CreateQuery(q *Query) (*Query, error) {
96
return nil, err
97
}
98
99
+ // New queries are created with a table visualization by default.
100
+ // We don't manage that visualization here, so immediately remove it.
101
+ if len(qp.Visualizations) > 0 {
102
+ for _, rv := range qp.Visualizations {
103
+ var v Visualization
104
+ err = json.Unmarshal(rv, &v)
105
+ if err != nil {
106
+ return nil, err
107
+ }
108
+ err = a.DeleteVisualization(&v)
109
110
111
112
113
+ qp.Visualizations = []json.RawMessage{}
114
115
+
116
return &qp, err
117
118
0 commit comments