xjc преди 4 месеца
родител
ревизия
cba6814552
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/weixin/controls.py

+ 2 - 1
src/weixin/controls.py

@@ -3769,7 +3769,8 @@ def get_user_markscore_week_avg(request):
     msret = msret.values("stock_date").distinct()
     for item in msret:
         qset = cm.UserMarkScore.objects.filter(stock_date=item['stock_date']).aggregate(avg_score=Avg("score"))
-        data.append({"stock_date":item['stock_date'],"avg_score":qset.get("avg_score",0)})
+        avg_score = "{}".format(round(qset.get("avg_score",0),1))
+        data.append({"stock_date":item['stock_date'],"avg_score":avg_score})
     # for i in range(1,5):
     #     item_list = []
     #     for j in range(1,8):