| Line 628... |
Line 628... |
| 628 |
it = Item.query.filter_by(id=flipkart_item.item_id).one()
|
628 |
it = Item.query.filter_by(id=flipkart_item.item_id).one()
|
| 629 |
category = Category.query.filter_by(id=it.category).one()
|
629 |
category = Category.query.filter_by(id=it.category).one()
|
| 630 |
parent_category = Category.query.filter_by(id=category.parent_category_id).first()
|
630 |
parent_category = Category.query.filter_by(id=category.parent_category_id).first()
|
| 631 |
if not categoryMap.has_key(category.id):
|
631 |
if not categoryMap.has_key(category.id):
|
| 632 |
temp = []
|
632 |
temp = []
|
| 633 |
temp.append(category.displayName)
|
633 |
temp.append(category.display_name)
|
| 634 |
temp.append(parent_category. parent_category.display_name)
|
634 |
temp.append(parent_category.display_name)
|
| 635 |
categoryMap[category.id] = temp
|
635 |
categoryMap[category.id] = temp
|
| 636 |
sip = SourceItemPercentage.query.filter(SourceItemPercentage.item_id==it.id).filter(SourceItemPercentage.source==OrderSource.FLIPKART).filter(SourceItemPercentage.startDate<=time).filter(SourceItemPercentage.expiryDate>=time).first()
|
636 |
sip = SourceItemPercentage.query.filter(SourceItemPercentage.item_id==it.id).filter(SourceItemPercentage.source==OrderSource.FLIPKART).filter(SourceItemPercentage.startDate<=time).filter(SourceItemPercentage.expiryDate>=time).first()
|
| 637 |
sourcePercentage = None
|
637 |
sourcePercentage = None
|
| 638 |
if sip is not None:
|
638 |
if sip is not None:
|
| 639 |
sourcePercentage = sip
|
639 |
sourcePercentage = sip
|