Skip to content
Snippets Groups Projects
Unverified Commit afc28b95 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Revert "Fix missing result metadata (#39201)" (#39294)

* Revert "Fix missing result metadata (#39201)"

This reverts commit d26b7820.

* Move resultsMetadata mapping to getSubmittableQuestion

* Bring back the test
parent b09db3b4
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,10 @@ import {
getCard,
getIsResultDirty,
getOriginalQuestion,
getParameters,
getQuestion,
getResultsMetadata,
getSubmittableQuestion,
isBasedOnExistingQuestion,
getParameters,
getSubmittableQuestion,
} from "../../selectors";
import { updateUrl } from "../navigation";
import { zoomInRow } from "../object-detail";
......@@ -237,17 +236,6 @@ export const apiUpdateQuestion = (question, { rerunQuery } = {}) => {
const isResultDirty = getIsResultDirty(getState());
const isModel = question.type() === "model";
if (isModel) {
const resultsMetadata = getResultsMetadata(getState());
if (!resultsMetadata) {
// Running the question will populate results metadata in redux store.
// Without it getSubmittableQuestion won't have all the necessary information.
await dispatch(runQuestionQuery());
}
}
const { isNative } = Lib.queryDisplayInfo(question.query());
if (!isNative) {
......
......@@ -121,7 +121,7 @@ export const runQuestionQuery = ({
const queryTimer = startTimer();
const runQuestionPromise = apiRunQuestionQuery(question, {
apiRunQuestionQuery(question, {
cancelDeferred: cancelQueryDeferred,
ignoreCache: ignoreCache,
isDirty: cardIsDirty,
......@@ -140,8 +140,6 @@ export const runQuestionQuery = ({
.catch(error => dispatch(queryErrored(startTime, error)));
dispatch({ type: RUN_QUERY, payload: { cancelQueryDeferred } });
return runQuestionPromise;
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment