File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
superset-frontend/src/components/Chart Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class Chart extends React.PureComponent {
169169 // Create chart with POST request
170170 this . props . actions . postChartFormData (
171171 this . props . formData ,
172- this . props . force || getUrlParam ( URL_PARAMS . force ) , // allow override via url params force=true
172+ Boolean ( this . props . force || getUrlParam ( URL_PARAMS . force ) ) , // allow override via url params force=true
173173 this . props . timeout ,
174174 this . props . chartId ,
175175 this . props . dashboardId ,
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ const v1ChartDataRequest = async (
183183 const qs = { } ;
184184 if ( sliceId !== undefined ) qs . form_data = `{"slice_id":${ sliceId } }` ;
185185 if ( dashboardId !== undefined ) qs . dashboard_id = dashboardId ;
186- if ( force !== false ) qs . force = force ;
186+ if ( force ) qs . force = force ;
187187
188188 const allowDomainSharding =
189189 // eslint-disable-next-line camelcase
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ describe('chart actions', () => {
5151 . callsFake ( ( ) => MOCK_URL ) ;
5252 getChartDataUriStub = sinon
5353 . stub ( exploreUtils , 'getChartDataUri' )
54- . callsFake ( ( ) => URI ( MOCK_URL ) ) ;
54+ . callsFake ( ( { qs } ) => URI ( MOCK_URL ) . query ( qs ) ) ;
5555 fakeMetadata = { useLegacyApi : true } ;
5656 metadataRegistryStub = sinon
5757 . stub ( chartlib , 'getChartMetadataRegistry' )
@@ -81,7 +81,7 @@ describe('chart actions', () => {
8181 } ) ;
8282
8383 it ( 'should query with the built query' , async ( ) => {
84- const actionThunk = actions . postChartFormData ( { } ) ;
84+ const actionThunk = actions . postChartFormData ( { } , null ) ;
8585 await actionThunk ( dispatch ) ;
8686
8787 expect ( fetchMock . calls ( MOCK_URL ) ) . toHaveLength ( 1 ) ;
You can’t perform that action at this time.
0 commit comments