Browse Source
Merge pull request #4710 from Budibase/fix/execute-query-action
Fix execute query action
master
Andrew Kingston
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
packages/client/src/utils/buttonActions.js
|
|
|
@ -127,12 +127,16 @@ const queryExecutionHandler = async action => { |
|
|
|
// Trigger a notification and invalidate the datasource as long as this
|
|
|
|
// was not a readable query
|
|
|
|
if (!query.readable) { |
|
|
|
API.notifications.error.success("Query executed successfully") |
|
|
|
notificationStore.actions.success("Query executed successfully") |
|
|
|
await dataSourceStore.actions.invalidateDataSource(query.datasourceId) |
|
|
|
} |
|
|
|
|
|
|
|
return { result } |
|
|
|
} catch (error) { |
|
|
|
notificationStore.actions.error( |
|
|
|
"An error occurred while executing the query" |
|
|
|
) |
|
|
|
|
|
|
|
// Abort next actions
|
|
|
|
return false |
|
|
|
} |
|
|
|
|