Subversion Repositories SmartDukaan

Rev

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

Rev 17986 Rev 17989
Line 50... Line 50...
50
                print "Identifier not valid for %d"%(item.get('_id'))
50
                print "Identifier not valid for %d"%(item.get('_id'))
51
                print item.get('identifier')
51
                print item.get('identifier')
52
        except Exception as e:
52
        except Exception as e:
53
            print e
53
            print e
54
            print "Exception Identifier not valid for %d"%(item.get('_id'))
54
            print "Exception Identifier not valid for %d"%(item.get('_id'))
55
    print bundleMap 
-
 
56
                
-
 
57
 
55
 
58
def addItemIdInfo():
56
def addItemIdInfo():
59
    global bundleMap
57
    global bundleMap
60
    try:
58
    try:
61
        CatalogDataService.initialize(db_hostname=options.hostname,setup=False)
59
        CatalogDataService.initialize(db_hostname=options.hostname,setup=False)
Line 70... Line 68...
70
                fetch = totalLength
68
                fetch = totalLength
71
                toBreak = True
69
                toBreak = True
72
                
70
                
73
            item_list = bundleMap.keys()[start:fetch]
71
            item_list = bundleMap.keys()[start:fetch]
74
            items = session.query(Item,PrivateDeals).outerjoin((PrivateDeals,Item.id==PrivateDeals.item_id)).filter(Item.catalog_item_id.in_(item_list)).all()
72
            items = session.query(Item,PrivateDeals).outerjoin((PrivateDeals,Item.id==PrivateDeals.item_id)).filter(Item.catalog_item_id.in_(item_list)).all()
75
            print items
-
 
76
            for i in items:
73
            for i in items:
77
                d_item = i[0]
74
                d_item = i[0]
78
                d_privatedeal = i[1]
75
                d_privatedeal = i[1]
79
                tempList = bundleMap.get(d_item.catalog_item_id)
76
                tempList = bundleMap.get(d_item.catalog_item_id)
80
                sellingPrice = d_item.sellingPrice
77
                sellingPrice = d_item.sellingPrice