Subversion Repositories SmartDukaan

Rev

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

Rev 23006 Rev 23009
Line 3408... Line 3408...
3408
    cursor = list(get_mongo_connection().Catalog.banners.find().sort("type",1).sort("rank", 1))
3408
    cursor = list(get_mongo_connection().Catalog.banners.find().sort("type",1).sort("rank", 1))
3409
    return cursor
3409
    return cursor
3410
 
3410
 
3411
def addProfitMandiBanner(data):
3411
def addProfitMandiBanner(data):
3412
    collection = get_mongo_connection().Catalog.banners
3412
    collection = get_mongo_connection().Catalog.banners
-
 
3413
    data['rank']=int(data['rank'])
3413
    fetched = list(collection.find({
3414
    fetched = list(collection.find({
3414
                     'rank':{'$gte':data['rank']}, 'type': data['type']
3415
                     'rank':{'$gte':data['rank']}, 'type': data['type']
3415
                    }))
3416
                    }))
3416
    if fetched:
3417
    if fetched:
3417
        for dict1 in fetched:
3418
        for dict1 in fetched: