Ensure the statistics are sorted
Sort the statistics by the period start date before returning them, and restore the test that verifies this behavior. bug 1151345 Change-Id: I4f05ea049b7609cea9dab947738b7aabf3f062ef Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
import copy
|
||||
import datetime
|
||||
import operator
|
||||
import re
|
||||
import urlparse
|
||||
|
||||
@@ -519,7 +520,8 @@ class Connection(base.Connection):
|
||||
query=q,
|
||||
)
|
||||
|
||||
return [r['value'] for r in results['results']]
|
||||
return sorted((r['value'] for r in results['results']),
|
||||
key=operator.itemgetter('period_start'))
|
||||
|
||||
def get_volume_sum(self, event_filter):
|
||||
"""Return the sum of the volume field for the events
|
||||
|
||||
Reference in New Issue
Block a user