Subversion Repositories SmartDukaan

Rev

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

Rev 15071 Rev 15072
Line 1054... Line 1054...
1054
def getAllNotifications(offset, limit):
1054
def getAllNotifications(offset, limit):
1055
    data = []
1055
    data = []
1056
    collection = get_mongo_connection().Catalog.Notifications
1056
    collection = get_mongo_connection().Catalog.Notifications
1057
    cursor = collection.find().skip(offset).limit(limit)
1057
    cursor = collection.find().skip(offset).limit(limit)
1058
    for val in cursor:
1058
    for val in cursor:
1059
        master = list(get_mongo_connection().Catalog.MasterData.find({'_id':val['skuBundleId']}))
1059
        master = list(get_mongo_connection().Catalog.MasterData.find({'skuBundleId':val['skuBundleId']}))
1060
        if len(master) > 0:
1060
        if len(master) > 0:
1061
            val['brand'] = master[0]['brand']
1061
            val['brand'] = master[0]['brand']
1062
            val['model_name'] = master[0]['model_name']
1062
            val['model_name'] = master[0]['model_name']
1063
            val['skuBundleId'] = master[0]['skuBundleId']
1063
            val['skuBundleId'] = master[0]['skuBundleId']
1064
        else:
1064
        else: