Skip to content

Commit

Permalink
fix: Query instance failure caused by missing prepared statement obj
Browse files Browse the repository at this point in the history
  • Loading branch information
albinAppsmith committed Sep 24, 2024
1 parent 4a70072 commit 37776ef
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/client/src/pages/Editor/QueryEditor/QueryResponseTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,14 @@ const QueryResponseTab = (props: Props) => {
hintMessages = actionResponse.messages;
}

const { pluginSpecifiedTemplates } =
currentActionConfig.actionConfiguration;
const { actionConfiguration } = currentActionConfig;
const hasPluginSpecifiedTemplates =
actionConfiguration.pluginSpecifiedTemplates?.[0]?.value === true;
// oracle have different key for prepared statements
const hasPreparedStatement =
actionConfiguration.formData?.preparedStatement?.data === true;

if (
error &&
pluginSpecifiedTemplates &&
pluginSpecifiedTemplates.length > 0 &&
pluginSpecifiedTemplates[0].value === true
) {
if (error && (hasPluginSpecifiedTemplates || hasPreparedStatement)) {
showPreparedStatementWarning = true;
}
}
Expand Down

0 comments on commit 37776ef

Please sign in to comment.