aboutsummaryrefslogtreecommitdiffstats
path: root/servo/views/product.py
diff options
context:
space:
mode:
Diffstat (limited to 'servo/views/product.py')
-rw-r--r--servo/views/product.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/servo/views/product.py b/servo/views/product.py
index d2c6750..e95dbc3 100644
--- a/servo/views/product.py
+++ b/servo/views/product.py
@@ -159,7 +159,7 @@ def get_inventory_report(request):
inventory, codemap = {}, {}
for k in cursor.fetchall():
- product_id = unicode(k[0])
+ product_id = str(k[0])
codemap[product_id] = k[1] # map product IDs to product codes
inv_slot = {k[2]: k[3]}
@@ -175,7 +175,7 @@ def get_inventory_report(request):
amount = p.get(i, '0') # fill empty inventory slots with zeros
inventory_cols.append(amount)
- code = unicode(codemap[k])
+ code = str(codemap[k])
row = [k, code] + inventory_cols
response.write("\t".join(row) + "\n")
@@ -200,9 +200,9 @@ def download_products(request, group="all"):
# @FIXME: Add total stocked amount to product
# currently the last column is a placeholder for stock counts in inventory uploads
for p in products:
- row = [unicode(i) for i in (p.pk, p.code, p.title,
- p.price_purchase_stock,
- p.price_sales_stock, 0)]
+ row = [str(i) for i in (p.pk, p.code, p.title,
+ p.price_purchase_stock,
+ p.price_sales_stock, 0)]
data += "\t".join(row) + "\n"
return send_csv(data, filename)