Skip to content

Commit

Permalink
ILAB date picker updates when no ILAB jobs found
Browse files Browse the repository at this point in the history
The `fetchILabJobs` action wasn't updating the date picker values from the API
response unless a non-empty list of jobs is returned. This means that on the
initial load, if the default API date range (1 month) doesn't find any jobs,
the displayed list is empty and the date range isn't updated to tell the user
what we've done.

I've seen no ill effects in local testing from simply removing the length
check, and now the date picker is updated correctly.
  • Loading branch information
dbutenhof committed Jan 13, 2025
1 parent 176ddee commit c81bc6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/actions/ilabActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const fetchILabJobs =
...(offset && { offset }),
},
});
if (response.status === 200 && response?.data?.results.length > 0) {
if (response.status === 200) {
const startDate = response.data.startDate,
endDate = response.data.endDate;
dispatch({
Expand Down

0 comments on commit c81bc6d

Please sign in to comment.