Subversion Repositories SmartDukaan

Rev

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

Rev 15139 Rev 15140
Line 640... Line 640...
640
        return {0:'Category specific deals is empty'}
640
        return {0:'Category specific deals is empty'}
641
    sorted_deals = sorted(category_specific_deals, key = lambda x: (x['persPoints'],x['totalPoints'],x['bestSellerPoints'], x['nlcPoints'], x['rank']),reverse=True)
641
    sorted_deals = sorted(category_specific_deals, key = lambda x: (x['persPoints'],x['totalPoints'],x['bestSellerPoints'], x['nlcPoints'], x['rank']),reverse=True)
642
    rank = 1
642
    rank = 1
643
    for sorted_deal in sorted_deals:
643
    for sorted_deal in sorted_deals:
644
        if sorted_deal['_id'] == skuData[0]['_id']:
644
        if sorted_deal['_id'] == skuData[0]['_id']:
645
            return {rank,'Rank found'}
645
            return {rank:'Rank found'}
646
            break 
646
            break 
647
        rank+=1
647
        rank+=1
648
    return {0:'Rank not found'}
648
    return {0:'Rank not found'}
649
    
649
    
650
 
650