Fix get_test_run_by_run_id() db api method

The get_test_run_by_run_id() method was broken, it was using the
incorrect db model name. (a copy and paste error) so the method
would not work. This corrects the issue so you can get all the
test runs for a give run_id field.

Change-Id: I289b04f8a1a26a34be2e22507c95a80c9347b1ad
This commit is contained in:
Matthew Treinish 2014-08-02 08:36:45 -04:00
parent a08a7afa81
commit 57722c6ef5

View File

@ -205,7 +205,8 @@ def get_test_runs_by_test_id(test_id, session=None):
def get_test_runs_by_run_id(run_id, session=None):
session = session or get_session()
test_runs = db_utils.model_query(models.Run, session=session).filter_by(
test_runs = db_utils.model_query(models.TestRun,
session=session).filter_by(
run_id=run_id).all()
return test_runs