Subversion Repositories SmartDukaan

Rev

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

Rev 13864 Rev 13866
Line 117... Line 117...
117
        temp.append(returnLatestPrice(item, source_id))
117
        temp.append(returnLatestPrice(item, source_id))
118
    return temp
118
    return temp
119
 
119
 
120
def getLatestPriceById(id):
120
def getLatestPriceById(id):
121
    item = list(get_mongo_connection().Catalog.MasterData.find({'_id':id}))
121
    item = list(get_mongo_connection().Catalog.MasterData.find({'_id':id}))
122
    returnLatestPrice(item, item[0]['source_id'])
122
    return returnLatestPrice(item[0], item[0]['source_id'])
123
    
123
    
124
 
124
 
125
 
125
 
126
 
126
 
127
def main():
127
def main():
128
    print getLatestPrice(1132,3)
128
    print getLatestPriceById(7)
129
 
129
 
130
if __name__=='__main__':
130
if __name__=='__main__':
131
    main()
131
    main()
132
132