Subversion Repositories SmartDukaan

Rev

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

Rev 14560 Rev 14562
Line 858... Line 858...
858
                val['source_product_name'] = ""
858
                val['source_product_name'] = ""
859
                val['skuBundleId'] = ""
859
                val['skuBundleId'] = ""
860
            data.append(val)
860
            data.append(val)
861
        return data
861
        return data
862
    else:
862
    else:
863
        skuIds = get_mongo_connection().MasterData.find({'skuBundleId':skuBundleId}).distinct('_id')
863
        skuIds = get_mongo_connection().Catalog.MasterData.find({'skuBundleId':skuBundleId}).distinct('_id')
864
        for sku in skuIds:
864
        for sku in skuIds:
865
            collection = get_mongo_connection().Catalog[class_name]
-
 
866
            cursor = collection.find({'sku':sku})
865
            cursor = collection.find({'sku':sku})
867
            for val in cursor:
866
            for val in cursor:
868
                master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
867
                master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
869
                if len(master) > 0:
868
                if len(master) > 0:
870
                    val['brand'] = master[0]['brand']
869
                    val['brand'] = master[0]['brand']