--- a/src/ldt/ldt/ldt_utils/views/json.py Mon Jan 07 17:01:02 2013 +0100
+++ b/src/ldt/ldt/ldt_utils/views/json.py Tue Jan 08 12:39:34 2013 +0100
@@ -163,7 +163,7 @@
current_weight = 1
# Now that we have the weight for all temporal segments, we just have to sort the array.
- highest_weighted = sorted(highest_weighted, key=lambda x: (-x["weight"],x["title"]))
+ highest_weighted = sorted(highest_weighted, key=itemgetter("weight"), reverse=True)
for res in highest_weighted:
cur_in = res["start_ts"]
cur_out = cur_in + res["duration"]