Subversion Repositories SmartDukaan

Rev

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

Rev 19398 Rev 19399
Line 2696... Line 2696...
2696
    
2696
    
2697
    id_list_mapping = {}
2697
    id_list_mapping = {}
2698
    if type == "brandInfo":
2698
    if type == "brandInfo":
2699
        brands = [int(brand_id) for brand_id in id_list.split('^')]
2699
        brands = [int(brand_id) for brand_id in id_list.split('^')]
2700
        for brand in brands:
2700
        for brand in brands:
-
 
2701
            print brand
2701
            tm_brand = get_mongo_connection().Catalog.Deals.find_one({'brand_id':brand},{'brand':1})
2702
            tm_brand = get_mongo_connection().Catalog.Deals.find_one({'brand_id':brand},{'brand':1})
-
 
2703
            print tm_brand
2702
            id_list_mapping[brand_id] = tm_brand.get('brand')
2704
            id_list_mapping[brand_id] = tm_brand.get('brand')
2703
    elif type == "subCategoryInfo":
2705
    elif type == "subCategoryInfo":
2704
        subCategories = [int(subCategoryId) for subCategoryId in id_list.split('^')]
2706
        subCategories = [int(subCategoryId) for subCategoryId in id_list.split('^')]
2705
        for subCat in subCategories:
2707
        for subCat in subCategories:
2706
            id_list_mapping[subCat] = SUB_CATEGORY_MAP.get(subCat)
2708
            id_list_mapping[subCat] = SUB_CATEGORY_MAP.get(subCat)