Bug 7156

Summary: The project builds page throws an error
Product: [Build System, Metadata & Runtime] Toaster Reporter: Belen Barros Pena <belen.barros.pena>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium+ CC: alexandru.damian, belen.barros.pena, bluelightning, bogdanx.a.voiculescu, cristiana.voicu, cristina-danielax.agurida
Version: unspecified   
Target Milestone: 1.8 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Belen Barros Pena 2015-01-16 11:15:46 UTC
When you click the "View all project builds" link in the project page, you get this error:

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/toastergui/project/1/builds

Django Version: 1.6
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'orm',
'toastermain',
'south',
'bldviewer',
'toastergui',
'bldcontrol')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


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 "/home/yocto/poky/bitbake/lib/toaster/toastergui/views.py" in projectbuilds
  2846.                                              ('Builds with
failed tasks', 'build__task_build__outcome:4',
queryset_with_search.filter(build__task_build__outcome=4).count()),
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py"
in filter
  590.         return self._filter_or_exclude(False, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py"
in _filter_or_exclude
  608.             clone.query.add_q(Q(*args, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in add_q
  1198.         clause = self._add_q(where_part, used_aliases)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in _add_q
  1232.                     current_negated=current_negated)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in build_filter
  1100.                     allow_explicit_fk=True)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in setup_joins
  1351.             names, opts, allow_many, allow_explicit_fk)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in names_to_path
  1274.                                      "Choices are: %s" %
(name, ", ".join(available)))

Exception Type: FieldError at /toastergui/project/1/builds
Exception Value: Cannot resolve keyword 'build' into field. Choices
are: bitbake_version, build_name, buildartifact, buildrequest,
completed_on, cooker_log_path, distro, distro_version, errors_no,
helptext_build, id, layer_version_build, logmessage, machine, outcome,
package, project, started_on, target, task_build, timespent,
variable_build, warnings_no
Comment 1 Alexandru Damian 2015-01-23 17:49:30 UTC
Pushed for review on 

poky-contrib:adamian/20150123-review
Comment 2 Alexandru Damian 2015-01-30 13:31:48 UTC
merged in master
Comment 3 Cristina Agurida 2015-03-24 11:55:26 UTC
Verified on master: 4bd886fb0081954879aaa2f574f3c7f6ced745d5
Comment 4 Cristina Agurida 2015-03-24 12:05:22 UTC
see above comment