From 1faa705673d80041a352f00c20cefb70cd347779 Mon Sep 17 00:00:00 2001 From: bsimpson63 Date: Tue, 23 Oct 2012 16:59:07 -0400 Subject: [PATCH] sort the PromotionLog --- r2/r2/lib/promote.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/promote.py b/r2/r2/lib/promote.py index 6aeb6194d..4fbeb81e4 100644 --- a/r2/r2/lib/promote.py +++ b/r2/r2/lib/promote.py @@ -1027,7 +1027,8 @@ class PromotionLog(tdb_cassandra.View): row = cls._byID(rowkey) except tdb_cassandra.NotFound: return [] - return row._values().values() + tuples = sorted(row._values().items(), key=lambda t: t[0].time) + return [t[1] for t in tuples] def Run(offset = 0):