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

Brightcells %!s(int64=6) %!d(string=hace) años
padre
commit
5f92e2ec19
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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])