Bug 7513 - The date picker feature breaks the builds pages
Summary: The date picker feature breaks the builds pages
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.8 M4
Assignee: Alexandru Damian
QA Contact: Cristina Agurida
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-03-25 13:19 UTC by Belen Barros Pena
Modified: 2015-04-17 13:36 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2015-03-25 13:19:58 UTC
The error happens in both the project builds and the all builds pages. This is the traceback:

Environment:


Request Method: GET
Request URL:
http://127.0.0.1:8000/toastergui/builds/?count=10&orderby=completed_on%3A-&
page=1

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',
'bldcontrol',
'bldviewer',
'toastergui')
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/master/bitbake/lib/toaster/toastergui/views.py" in builds
  1879.             context, pagesize, orderby =
_build_list_helper(request, buildrequests, True)
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in
_build_list_helper
  2017.         context_date,today_begin,yesterday_begin =
_add_daterange_context(queryset_all, request, {'created','updated'})
File "/home/yocto/master/bitbake/lib/toaster/toastergui/views.py" in
_add_daterange_context
  337.        
context_date['dateMin_'+key]=timezone.localtime(getattr(queryset_key.first(
),key)).strftime("%d/%m/%Y")

Exception Type: AttributeError at /toastergui/builds/
Exception Value: 'NoneType' object has no attribute 'updated'
Comment 1 Alexandru Damian 2015-03-25 13:40:56 UTC
Patch for review on 

poky-contrib:adamian/20150324_submission
Comment 2 Alexandru Damian 2015-04-07 13:23:51 UTC
Merged to master.
Comment 3 Cristina Agurida 2015-04-17 13:36:01 UTC
Verified on master: 547b189951283e1ea1fabd135d32bcb59124d8c3