Skip to content

Commit d57154c

Browse files
Fix issue with invalid schema due to invalid querycontext
1 parent 58adaef commit d57154c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/superset/chart/update_dataset.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ def params_updated
3737
new_params.merge!("owners": chart.owner_ids ) # expects an array of user ids
3838

3939
new_params.merge!("params": updated_chart_params.to_json) # updated to point to the new params
40-
new_params.merge!("query_context": updated_chart_query_context.to_json) # update to point to the new query context
41-
new_params.merge!("query_context_generation": true) # new param set to true to regenerate the query context
40+
query_context = updated_chart_query_context
41+
if query_context
42+
new_params.merge!("query_context": query_context.to_json) # update to point to the new query context
43+
new_params.merge!("query_context_generation": true) # new param set to true to regenerate the query context
44+
end
4245

4346
new_params
4447
end

0 commit comments

Comments
 (0)