Subversion Repositories SmartDukaan

Rev

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

Rev 16464 Rev 16472
Line 68... Line 68...
68
    print 'Identifier'
68
    print 'Identifier'
69
    for x in bestSellers:
69
    for x in bestSellers:
70
        print x.rank,
70
        print x.rank,
71
        print '\t',
71
        print '\t',
72
        print x.identifier,
72
        print x.identifier,
-
 
73
        print '\t',
73
        col = get_mongo_connection().Catalog.MasterData.find({'identifier':x.identifier, 'source_id':6})
74
        col = list(get_mongo_connection().Catalog.MasterData.find({'identifier':x.identifier, 'source_id':6}))
74
        print "count sku",len(list(col))
75
        print "count sku",len(col)
75
        print '\n',
76
        print '\n'
76
        if len(list(col)) == 0:
77
        if len(col) == 0:
77
            x.category = category
78
            x.category = category
78
            exceptionList.append(x)
79
            exceptionList.append(x)
79
        else:
80
        else:
80
            get_mongo_connection().Catalog.MasterData.update({'identifier':x.identifier, 'source_id':6 }, {'$set' : {'rank':x.rank,'updatedOn':to_java_date(now)}})
81
            get_mongo_connection().Catalog.MasterData.update({'identifier':x.identifier, 'source_id':6 }, {'$set' : {'rank':x.rank,'updatedOn':to_java_date(now)}})
81
        
82