Merge lp:~milo/lava-dashboard/bug1052545 into lp:lava-dashboard

Proposed by Milo Casagrande
Status: Merged
Merged at revision: 349
Proposed branch: lp:~milo/lava-dashboard/bug1052545
Merge into: lp:lava-dashboard
Diff against target: 25 lines (+3/-3)
1 file modified
dashboard_app/xmlrpc.py (+3/-3)
To merge this branch: bzr merge lp:~milo/lava-dashboard/bug1052545
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+126468@code.launchpad.net

Description of the change

This branch fixes the use of the wrong filed of the Test model to get the test names. We need to use test_id, not name.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dashboard_app/xmlrpc.py'
--- dashboard_app/xmlrpc.py 2012-09-26 13:55:57 +0000
+++ dashboard_app/xmlrpc.py 2012-09-26 14:45:29 +0000
@@ -408,7 +408,7 @@
408 'is_deserialized': bundle.is_deserialized408 'is_deserialized': bundle.is_deserialized
409 } for bundle in bundle_stream.bundles.all().order_by("uploaded_on")]409 } for bundle in bundle_stream.bundles.all().order_by("uploaded_on")]
410410
411 @xml_rpc_signature('str', 'str')411 @xml_rpc_signature('str')
412 def get_test_names(self, device_type=None):412 def get_test_names(self, device_type=None):
413 """413 """
414 Name414 Name
@@ -433,10 +433,10 @@
433 for test in Test.objects.filter(433 for test in Test.objects.filter(
434 test_runs__attributes__name='target.device_type',434 test_runs__attributes__name='target.device_type',
435 test_runs__attributes__value=device_type).distinct():435 test_runs__attributes__value=device_type).distinct():
436 test_names.append(test.name)436 test_names.append(test.test_id)
437 else:437 else:
438 for test in Test.objects.all():438 for test in Test.objects.all():
439 test_names.append(test.name)439 test_names.append(test.test_id)
440 return test_names440 return test_names
441441
442 def deserialize(self, content_sha1):442 def deserialize(self, content_sha1):

Subscribers

People subscribed via source and target branches