| Line 625... |
Line 625... |
| 625 |
if source_id in (1,2,4,5):
|
625 |
if source_id in (1,2,4,5):
|
| 626 |
skuData = list(get_mongo_connection().Catalog.MasterData.find({'identifier':identifier.strip(), 'source_id':source_id}))
|
626 |
skuData = list(get_mongo_connection().Catalog.MasterData.find({'identifier':identifier.strip(), 'source_id':source_id}))
|
| 627 |
elif source_id == 3:
|
627 |
elif source_id == 3:
|
| 628 |
skuData = list(get_mongo_connection().Catalog.MasterData.find({'secondaryIdentifier':identifier.strip(), 'source_id':source_id}))
|
628 |
skuData = list(get_mongo_connection().Catalog.MasterData.find({'secondaryIdentifier':identifier.strip(), 'source_id':source_id}))
|
| 629 |
else:
|
629 |
else:
|
| 630 |
return {'rank':0, 'description':'No product found'}
|
630 |
return {'rank':0, 'description':'Source not valid'}
|
| - |
|
631 |
if len(skuData) == 0:
|
| - |
|
632 |
return {'rank':0, 'description':'No matching product identifier found'}
|
| 631 |
user_specific_deals = mc.get(str(userId))
|
633 |
user_specific_deals = mc.get(str(userId))
|
| 632 |
if user_specific_deals is None:
|
634 |
if user_specific_deals is None:
|
| 633 |
__populateCache(userId)
|
635 |
__populateCache(userId)
|
| 634 |
user_specific_deals = mc.get(str(userId))
|
636 |
user_specific_deals = mc.get(str(userId))
|
| 635 |
else:
|
637 |
else:
|