Skip to content

Commit

Permalink
修复Top10Ne的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangjiahe committed Mar 18, 2019
1 parent c2e072f commit 87fc4ca
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions report/statistics_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,10 @@ def get(self, request, year, month):
rs = get_top10_ne(begin_date, end_date, profession)
rs_dict.update(rs)
for item in rs[profession]:
value_list = list(item.values())
StatisticsTop10Ne(index=str(value_list[0]),
city=value_list[1],
ne=value_list[2],
amount=value_list[3],
StatisticsTop10Ne(index=str(item.get('index', '')),
city=item.get('city', ''),
ne=item.get('ne', ''),
amount=item.get('distributeAmount', 0),
yearNum=year,
monthNum=month,
profession=profession
Expand Down

0 comments on commit 87fc4ca

Please sign in to comment.