Skip to content

Commit 15d83bc

Browse files
authored
Merge pull request #257 from yungwine/mytonctrl2_dev
sort complaints
2 parents 860f1b5 + 302c498 commit 15d83bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mytoncore/mytoncore.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,9 @@ def GetComplaints(self, electionId=None, past=False):
22802280
complaints[chash] = item
22812281
#end for
22822282

2283+
# sort complaints by their creation time and hash
2284+
complaints = dict(sorted(complaints.items(), key=lambda item: (item[1]["createdTime"], item[0])))
2285+
22832286
# Set buffer
22842287
self.SetFunctionBuffer(bname, complaints)
22852288

0 commit comments

Comments
 (0)