Subversion Repositories SmartDukaan

Rev

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

Rev 15239 Rev 15240
Line 628... Line 628...
628
            else:
628
            else:
629
                retailer = self.getNewRetailer()
629
                retailer = self.getNewRetailer()
630
            fetchInfo = FetchDataHistory()
630
            fetchInfo = FetchDataHistory()
631
            fetchInfo.agent_id = self.agentId
631
            fetchInfo.agent_id = self.agentId
632
            fetchInfo.call_type = self.callType
632
            fetchInfo.call_type = self.callType
633
            agent = session.query(Agents).filter_by(agent_id=self.agentId).first()
633
            agent = session.query(Agents).filter_by(id=self.agentId).first()
634
            last_disposition = session.query(CallHistory).filter_by(agent_id=self.agentId).order_by(CallHistory.id.desc()).first()
634
            last_disposition = session.query(CallHistory).filter_by(agent_id=self.agentId).order_by(CallHistory.id.desc()).first()
635
            if last_disposition is None or last_disposition.created < agent.last_login:
635
            if last_disposition is None or last_disposition.created < agent.last_login:
636
                fetchInfo.last_action = 'login'
636
                fetchInfo.last_action = 'login'
637
                fetchInfo.last_action_time = agent.last_login 
637
                fetchInfo.last_action_time = agent.last_login 
638
            else:
638
            else: