Subversion Repositories SmartDukaan

Rev

Rev 16280 | Rev 16300 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16280 Rev 16282
Line 621... Line 621...
621
    if source_id in (1,2,4,5):
621
    if source_id in (1,2,4,5):
622
        skuData = list(get_mongo_connection().Catalog.MasterData.find({'identifier':identifier.strip(), 'source_id':source_id}))
622
        skuData = list(get_mongo_connection().Catalog.MasterData.find({'identifier':identifier.strip(), 'source_id':source_id}))
623
    elif source_id == 3:
623
    elif source_id == 3:
624
        skuData = list(get_mongo_connection().Catalog.MasterData.find({'secondaryIdentifier':identifier.strip(), 'source_id':source_id}))
624
        skuData = list(get_mongo_connection().Catalog.MasterData.find({'secondaryIdentifier':identifier.strip(), 'source_id':source_id}))
625
    else:
625
    else:
626
        return {'rank':0, 'description':'Source not valid','maxNlc':None, 'minNlC':None,'status':None,'dp':None}
626
        return {'rank':0, 'description':'Source not valid','maxNlc':None, 'minNlc':None,'status':None,'dp':None}
627
    if len(skuData) == 0:
627
    if len(skuData) == 0:
628
        return {'rank':0, 'description':'No matching product identifier found','maxNlc':None, 'minNlC':None,'status':None,'dp':None}
628
        return {'rank':0, 'description':'No matching product identifier found','maxNlc':None, 'minNlc':None,'status':None,'dp':None}
629
    user_specific_deals = mc.get(str(userId))
629
    user_specific_deals = mc.get(str(userId))
630
    if user_specific_deals is None:
630
    if user_specific_deals is None:
631
        __populateCache(userId)
631
        __populateCache(userId)
632
        user_specific_deals = mc.get(str(userId))
632
        user_specific_deals = mc.get(str(userId))
633
    else:
633
    else: