Release v71.0.4
patch wrong analysis set as complete in cases with multiple analyses (#4435)
Description
The AnalysisAPI method update_analysis_as_completed_statusdb used in the store methods picked up the analysis with the latest completed_at date to be stored. Still, by this point all of the analyses of the case had completed_at = None, making the function pick up the wrong analysis for updating. This PR changes the sorting to started_at instead.
Added
- New CRUD function
get_latest_started_analysis_for_casewith tests
Changed
- AnalysisAPI method
update_analysis_as_completed_statusdbso that it uses the new function
Co-authored-by: Linnéa Löfdahl linnea.lofdahl@scilifelab.se