Skip to content

Commit

Permalink
chore(experiments): Improve result state resetting (#27391)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
danielbachhuber and github-actions[bot] authored Jan 9, 2025
1 parent d29e3b8 commit 628a6df
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions frontend/src/scenes/experiments/experimentLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,6 @@ export const experimentLogic = kea<experimentLogicType>([
if (values.experiment?.start_date) {
actions.loadMetricResults(true)
actions.loadSecondaryMetricResults(true)
} else {
actions.loadMetricResultsSuccess([])
actions.loadSecondaryMetricResultsSuccess([])
}
},
endExperiment: async () => {
Expand Down Expand Up @@ -764,16 +761,14 @@ export const experimentLogic = kea<experimentLogicType>([
resetRunningExperiment: async () => {
actions.updateExperiment({ start_date: null, end_date: null, archived: false })
values.experiment && actions.reportExperimentReset(values.experiment)
actions.loadMetricResultsSuccess([])
actions.loadSecondaryMetricResultsSuccess([])
},
updateExperimentSuccess: async ({ experiment }) => {
actions.updateExperiments(experiment)
if (experiment.start_date) {
actions.loadMetricResults()
actions.loadSecondaryMetricResults()
} else {
actions.loadMetricResultsSuccess([])
actions.loadSecondaryMetricResultsSuccess([])
}
},
setExperiment: async ({ experiment }) => {
Expand Down

0 comments on commit 628a6df

Please sign in to comment.