Subversion Repositories SmartDukaan

Rev

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

Rev 14559 Rev 14560
Line 860... Line 860...
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().MasterData.find({'skuBundleId':skuBundleId}).distinct('_id')
864
        for sku in skuIds:
864
        for sku in skuIds:
-
 
865
            collection = get_mongo_connection().Catalog[class_name]
865
            cursor = collection.find({'sku':sku})
866
            cursor = collection.find({'sku':sku})
866
            for val in cursor:
867
            for val in cursor:
867
                master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
868
                master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['sku']}))
868
                if len(master) > 0:
869
                if len(master) > 0:
869
                    val['brand'] = master[0]['brand']
870
                    val['brand'] = master[0]['brand']