summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--israwhidebroken/controllers.py8
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"))