diff --git a/src/test/unit/web_interface/test_app_show_analysis.py b/src/test/unit/web_interface/test_app_show_analysis.py index 9c7709725..00cce6445 100644 --- a/src/test/unit/web_interface/test_app_show_analysis.py +++ b/src/test/unit/web_interface/test_app_show_analysis.py @@ -67,7 +67,7 @@ def test_app_show_analysis_file_with_preview(self, test_client): def test_app_show_analysis_invalid_analysis(self, test_client): result = test_client.get(f'/analysis/{TEST_FW.uid}/this_analysis_does_not_exist/ro/{TEST_FW.uid}').data - assert b'Error!' in result + assert b'The requested analysis (this_analysis_does_not_exist) has not run (yet)' in result def test_app_single_file_analysis(self, test_client, intercom_task_list): result = test_client.get(f'/analysis/{TEST_FW.uid}') diff --git a/src/web_interface/components/analysis_routes.py b/src/web_interface/components/analysis_routes.py index 01af37a1b..e37a44a90 100644 --- a/src/web_interface/components/analysis_routes.py +++ b/src/web_interface/components/analysis_routes.py @@ -58,9 +58,8 @@ def show_analysis(self, uid, selected_analysis=None, root_uid=None): if not file_obj: return render_template('uid_not_found.html', uid=uid) if selected_analysis is not None and selected_analysis not in file_obj.processed_analysis: - return render_template( - 'error.html', message=f'The requested analysis ({selected_analysis}) has not run (yet)' - ) + flash(f'The requested analysis ({selected_analysis}) has not run (yet)', 'warning') + selected_analysis = None if isinstance(file_obj, Firmware): root_uid = file_obj.uid other_versions = frontend_db.get_other_versions_of_firmware(file_obj)