Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2065)

Unified Diff: appengine/chromium_cq_status/handlers/query.py

Issue 515093004: chromium-cq-status: StatsTest utility class for testing CQ stats (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/chromium_cq_status/model/record.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_cq_status/handlers/query.py
diff --git a/appengine/chromium_cq_status/handlers/query.py b/appengine/chromium_cq_status/handlers/query.py
index 7106277d3a30c33d9f84acdd1d11aecbabc46601..aebf6fb064e2bc264f63991c568fdbf79597b5d6 100644
--- a/appengine/chromium_cq_status/handlers/query.py
+++ b/appengine/chromium_cq_status/handlers/query.py
@@ -19,7 +19,6 @@ from shared.parsing import (
parse_timestamp,
use_default,
)
-from shared.utils import to_unix_timestamp
from model.record import Record # pylint: disable-msg=E0611
def execute_query(
@@ -55,16 +54,8 @@ def execute_query(
if matches_fields(fields, record):
records.append(record)
- results = []
- for record in records:
- result = record.to_dict(exclude=['timestamp'])
- result['timestamp'] = to_unix_timestamp(record.timestamp)
- record_key = record.key.id()
- result['key'] = record_key if type(record_key) != long else None
- results.append(result)
-
return {
- 'results': results,
+ 'results': [record.to_dict() for record in records],
'cursor': next_cursor,
'more': more,
}
« no previous file with comments | « no previous file | appengine/chromium_cq_status/model/record.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698