Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward to analysis page (missing analysis) #1320

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test/unit/web_interface/test_app_show_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down
5 changes: 2 additions & 3 deletions src/web_interface/components/analysis_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading