=== modified file 'dashboard_app/helpers.py'
@@ -736,7 +736,7 @@
from dashboard_app.models import TestResult
super(BundleFormatImporter_1_5, self)._import_test_results(c_test_run, s_test_run)
for index, c_test_result in enumerate(c_test_run.get("test_results", []), 1):
- if c_test_result.get("attributes", {}):
+ if c_test_result.get("attachments", {}):
s_test_result = TestResult.objects.get(
relative_index=index, test_run=s_test_run)
self._import_test_result_attachments(c_test_result, s_test_result)
=== modified file 'dashboard_app/views/__init__.py'
@@ -569,7 +569,7 @@
parent=test_result_detail,
needs=['pathname', 'content_sha1', 'analyzer_assigned_uuid', 'relative_index'])
def result_attachment_list(request, pathname, content_sha1, analyzer_assigned_uuid, relative_index):
- test_result = get_restricted_object_or_404(
+ test_result = get_restricted_object(
TestResult,
lambda test_result: test_result.test_run.bundle.bundle_stream,
request.user,
@@ -619,7 +619,7 @@
parent=result_attachment_list,
needs=['pathname', 'content_sha1', 'analyzer_assigned_uuid', 'relative_index', 'pk'])
def result_attachment_detail(request, pathname, content_sha1, analyzer_assigned_uuid, relative_index, pk):
- attachment = get_restricted_object_or_404(
+ attachment = get_restricted_object(
Attachment,
lambda attachment: attachment.bundle.bundle_stream,
request.user,