Bug 7404

Summary: tasks: Outcome button sort causes AttributeError exception
Product: [Build System, Metadata & Runtime] Toaster Reporter: Dave Lerner <dave.lerner>
Component: toasterAssignee: Michael Wood <michael.g.wood>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, alexandru.damian, belen.barros.pena, bluelightning, cristiana.voicu, cristina-danielax.agurida, jessica.zhang
Version: 1.8   
Target Milestone: 1.8 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: front-end
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Dave Lerner 2015-03-05 17:34:01 UTC
Build for a project based on qemux86 target=core-image-minimal
Select the project -> Tasks
Clickl on Outcome to sort.  

Get the following error:
AttributeError at /toastergui/build/2/tasks/

'list' object has no attribute 'select_related'
...

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/ord-dlerner-d81/dlerner/git/poky/bitbake/lib/toaster/toastergui/views.py" in tasks
  1007.     return tasks_common(request, build_id, 'tasks', '')
File "/ord-dlerner-d81/dlerner/git/poky/bitbake/lib/toaster/toastergui/views.py" in tasks_common
  833.     queryset = queryset.select_related("recipe", "build")

Exception Type: AttributeError at /toastergui/build/2/tasks/
Exception Value: 'list' object has no attribute 'select_related'
Comment 1 Belen Barros Pena 2015-03-05 18:06:22 UTC
This seems to happen with both "Outcome" and "Cache attempt" in this table.
Comment 3 Cristina Agurida 2015-04-01 09:16:22 UTC
Verified on master: 5c76cebc24675edb3dff473fce9b67cedff615db