Subversion Repositories SmartDukaan

Rev

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

Rev 15362 Rev 15364
Line 1023... Line 1023...
1023
        obj.contact2 = None if len(otherContacts)==1 else otherContacts[1]
1023
        obj.contact2 = None if len(otherContacts)==1 else otherContacts[1]
1024
    obj.scheduled = (retailer.call_priority is not None)
1024
    obj.scheduled = (retailer.call_priority is not None)
1025
    obj.status = retailer.status
1025
    obj.status = retailer.status
1026
    if callType == 'onboarding':
1026
    if callType == 'onboarding':
1027
        try:
1027
        try:
1028
            userId, = session.query(RetailerLinks.user_id).filter(RetailerLinks.retailer_id==retailer.id).first()
1028
            userId, activatedTime = session.query(RetailerLinks.user_id, RetailerLinks.activated).filter(RetailerLinks.retailer_id==retailer.id).first()
-
 
1029
            activated = session.query(Users.activation_time).filter(Users.id==userId).first()
-
 
1030
            if activated is not None:
-
 
1031
                activatedTime, = activated
1029
            obj.user_id = userId
1032
            obj.user_id = userId
-
 
1033
            obj.created = datetime.strftime(activatedTime, '%d/%m/%Y %H:%M:%S')
1030
            result = fetchResult("select * from useractive where user_id=%d"%(userId))
1034
            result = fetchResult("select * from useractive where user_id=%d"%(userId))
1031
            if result == ():
1035
            if result == ():
1032
                obj.last_active = None
1036
                obj.last_active = None
1033
            else:
1037
            else:
1034
                obj.last_active =datetime.strftime(result[0][1], '%d/%m/%Y %H:%M:%S')
1038
                obj.last_active =datetime.strftime(result[0][1], '%d/%m/%Y %H:%M:%S')