diff options
author | Will Woods <wwoods@redhat.com> | 2009-09-17 16:54:27 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2009-09-17 16:54:27 -0400 |
commit | dea78b5bd5cfbd3a5c106cdf62fc9b1f64523f58 (patch) | |
tree | bfe7d061f42d1bd629fd72b74d8d50acad44048b /israwhidebroken | |
parent | ed0cf74fa4fe1a19681ce0c9b28a56846e2248a6 (diff) | |
download | israwhidebroken-dea78b5bd5cfbd3a5c106cdf62fc9b1f64523f58.tar.gz israwhidebroken-dea78b5bd5cfbd3a5c106cdf62fc9b1f64523f58.tar.xz israwhidebroken-dea78b5bd5cfbd3a5c106cdf62fc9b1f64523f58.zip |
Add userid when creating new TestResult, and allow search by tree id in get_trees
Diffstat (limited to 'israwhidebroken')
-rw-r--r-- | israwhidebroken/controllers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/israwhidebroken/controllers.py b/israwhidebroken/controllers.py index cbe317a..9a1265e 100644 --- a/israwhidebroken/controllers.py +++ b/israwhidebroken/controllers.py @@ -34,7 +34,7 @@ class Root(controllers.RootController): def _tree_select(self, *args, **kw): qlist = [] - for field in 'arch', 'compose_id', 'tree_time', 'repodata_time': + for field in 'id', 'arch', 'compose_id', 'tree_time', 'repodata_time': if field in kw: qlist.append('%s == %s' % (field, Tree.sqlrepr(kw[field]))) return Tree.select(' AND '.join(qlist)) @@ -64,8 +64,10 @@ class Root(controllers.RootController): def add_result(self, treeid, testid, result): tr = TestResult(tree=to_int(treeid), test=to_int(testid), - result=to_int(result)) - hub.commit() # XXX redundant? + result=to_int(result), + userid=identity.current.user_id, + bug_id=None) + hub.commit() # XXX necessary? return dict(id=tr.id) @identity.require(identity.in_group("qa-admin")) |