Fix Bug: 'ConsumeModelSaleStatisticInfo' object has no attribute 'get'

Brightcells 6 years ago
parent
commit
5f92e2ec19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      statistic/views.py

+ 1 - 1
statistic/views.py

@@ -224,7 +224,7 @@ def ymdtj(brand_id, ymd, lastymd):
224 224
     models = [m.data for m in current_models[:20]]
225 225
 
226 226
     # [消费者维度] 周期内镜头销售支数
227
-    sell_volume_count = sum([m.get('num', 0) for m in current_models])
227
+    sell_volume_count = sum([m.num for m in current_models])
228 228
 
229 229
     last_models = ConsumeModelSaleStatisticInfo.objects.filter(brand_id=brand_id, ymd=lastymd, status=True).order_by('-num')
230 230
     last_sell_volume_count = sum([m.num for m in last_models])