Skip to content

Commit

Permalink
fix: loading experiments without filterset (#9059)
Browse files Browse the repository at this point in the history
(cherry picked from commit 93bca2a)
  • Loading branch information
johnkim-det authored and determined-ci committed Mar 27, 2024
1 parent 4efaede commit 2e31ece
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions webui/react/src/pages/F_ExpList/F_ExperimentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,17 @@ const F_ExperimentList: React.FC<Props> = ({ project }) => {
if (!prevPs?.isLoaded) {
ps.forEach((s) => {
cleanup?.();
// init formset
if (!s?.filterset) return;
const formSetValidation = IOFilterFormSet.decode(JSON.parse(s.filterset));
if (isLeft(formSetValidation)) {
handleError(formSetValidation.left, {
publicSubject: 'Unable to initialize filterset from settings',
});
if (!s?.filterset) {
formStore.init();
} else {
formStore.init(formSetValidation.right);
const formSetValidation = IOFilterFormSet.decode(JSON.parse(s.filterset));
if (isLeft(formSetValidation)) {
handleError(formSetValidation.left, {
publicSubject: 'Unable to initialize filterset from settings',
});
} else {
formStore.init(formSetValidation.right);
}
}
cleanup = formStore.asJsonString.subscribe(() => {
resetPagination();
Expand Down

0 comments on commit 2e31ece

Please sign in to comment.