Commit 61926641 authored by 赵威's avatar 赵威

update order

parent e63545c4
......@@ -42,8 +42,8 @@ def user_portrait_scan_info():
def _dict_to_name_score(d):
res = []
new_d = dict(sorted(d.items(), key=lambda x: x[1], reverse=True))
for (k, v) in new_d.items():
new_d = sorted(d.items(), key=lambda x: x[1], reverse=True)
for (k, v) in new_d:
res.append({"name": k, "score": float(v)})
return res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment