浏览代码

Fixed calculation bug with range upload stats

master
David Winterbottom 13 年前
父节点
当前提交
5a05f223ee
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 3
    3
      oscar/apps/dashboard/ranges/models.py
  2. 2
    2
      oscar/templates/dashboard/ranges/range_product_list.html

+ 3
- 3
oscar/apps/dashboard/ranges/models.py 查看文件

73
         found_skus = set(products.values_list('stockrecord__partner_sku', flat=True))
73
         found_skus = set(products.values_list('stockrecord__partner_sku', flat=True))
74
         found_upcs = set(products.values_list('upc', flat=True))
74
         found_upcs = set(products.values_list('upc', flat=True))
75
         found_ids = found_skus.union(found_upcs)
75
         found_ids = found_skus.union(found_upcs)
76
-        missing_skus = new_ids - found_ids
77
-        dupes = set(all_ids).intersection(existing_skus)
76
+        missing_ids = new_ids - found_ids
77
+        dupes = set(all_ids).intersection(existing_ids)
78
 
78
 
79
-        self.mark_as_processed(len(found_skus), len(missing_skus), len(dupes))
79
+        self.mark_as_processed(len(found_ids), len(missing_ids), len(dupes))
80
 
80
 
81
     def extract_ids(self):
81
     def extract_ids(self):
82
         """
82
         """

+ 2
- 2
oscar/templates/dashboard/ranges/range_product_list.html 查看文件

51
 				<tr>
51
 				<tr>
52
 					<th>Filename</th>
52
 					<th>Filename</th>
53
 					<th>New products</th>
53
 					<th>New products</th>
54
-					<th>Dupliate products</th>
54
+					<th>Duplicate products</th>
55
 					<th>Unknown products</th>
55
 					<th>Unknown products</th>
56
 					<th>Date uploaded</th>
56
 					<th>Date uploaded</th>
57
 				</tr>
57
 				</tr>
61
 				<tr>
61
 				<tr>
62
 					<td>{{ upload.filename }}</td>
62
 					<td>{{ upload.filename }}</td>
63
 					<td>{{ upload.num_new_skus }}</td>
63
 					<td>{{ upload.num_new_skus }}</td>
64
-					<td>{{ upload.num_unknown_skus }}</td>
65
 					<td>{{ upload.num_duplicate_skus }}</td>
64
 					<td>{{ upload.num_duplicate_skus }}</td>
65
+					<td>{{ upload.num_unknown_skus }}</td>
66
 					<td>{{ upload.date_uploaded }}</td>
66
 					<td>{{ upload.date_uploaded }}</td>
67
 				</tr>
67
 				</tr>
68
 				{% endfor %}
68
 				{% endfor %}

正在加载...
取消
保存