242 +def test_result_detail(request, release, image_id, name, id): 243 + image = get_object_or_404(SmokeImage, id=image_id) 244 + result = get_object_or_404( 245 + SmokeResult, 246 + image__id=image_id, 247 + name=name, 248 + publish=True, 249 + ) 250 + tests = SmokeTestResult.objects.filter( 251 + result=result, 252 + pk=id, 253 + )
I think you can replace lines 243-253 with:
test = SmokeTestResult.objects.get(pk=id)
« Back to merge proposal
242 +def test_result_ detail( request, release, image_id, name, id): or_404( SmokeImage, id=image_id) .objects. filter(
243 + image = get_object_
244 + result = get_object_or_404(
245 + SmokeResult,
246 + image__id=image_id,
247 + name=name,
248 + publish=True,
249 + )
250 + tests = SmokeTestResult
251 + result=result,
252 + pk=id,
253 + )
I think you can replace lines 243-253 with:
test = SmokeTestResult .objects. get(pk= id)