summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-24 13:43:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-14 14:10:02 +0100
commit1712c715f3505e85ece2e32dcc3333ce6b5c1ee7 (patch)
tree7db012ca67498e12861a8d809b7aa3ccd8ef19c4 /bitbake/lib
parent9e99bcffec594cb5b4c3533200e8eb56d32e6a77 (diff)
downloadpoky-1712c715f3505e85ece2e32dcc3333ce6b5c1ee7.tar.gz
bitbake: toaster: remove strftime calls in filters
We remove the unneeded strftime calls in filters, as the filters can deal directly with datetime types. [YOCTO #6379] (Bitbake rev: 149693a342fe3a56027943d3ecb8bf2e1d0d652b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 68e981a50e..1f3e11d57c 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -301,9 +301,9 @@ def builds(request):
301 'filter' : {'class' : 'started_on', 301 'filter' : {'class' : 'started_on',
302 'label': 'Show:', 302 'label': 'Show:',
303 'options' : [ 303 'options' : [
304 ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now().strftime("%Y-%m-%d")).count()), 304 ("Today's builds" , 'started_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=timezone.now()).count()),
305 ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")).count()), 305 ("Yesterday's builds", 'started_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(hours=24))).count()),
306 ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")).count()), 306 ("This week's builds", 'started_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(started_on__gte=(timezone.now()-timedelta(days=7))).count()),
307 ] 307 ]
308 } 308 }
309 }, 309 },
@@ -315,9 +315,9 @@ def builds(request):
315 'filter' : {'class' : 'completed_on', 315 'filter' : {'class' : 'completed_on',
316 'label': 'Show:', 316 'label': 'Show:',
317 'options' : [ 317 'options' : [
318 ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now().strftime("%Y-%m-%d")).count()), 318 ("Today's builds", 'completed_on__gte:'+timezone.now().strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=timezone.now()).count()),
319 ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d")).count()), 319 ("Yesterday's builds", 'completed_on__gte:'+(timezone.now()-timedelta(hours=24)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(hours=24))).count()),
320 ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d")).count()), 320 ("This week's builds", 'completed_on__gte:'+(timezone.now()-timedelta(days=7)).strftime("%Y-%m-%d"), queryset_with_search.filter(completed_on__gte=(timezone.now()-timedelta(days=7))).count()),
321 ] 321 ]
322 } 322 }
323 }, 323 },