def flush_audit_log(self, h): for log in self.cmd_logs: row = models.AuditLog(user=self.user, host=h, log_type=log[2], content=log[1], date=log[0]) row.save() self.cmd_logs = [] return True
def flush_audit_log(self, h): for log in self.cmd_logs: row = models.AuditLog(session=self.session_track, user=self.login_user.userprofile, host=h, action_type=log[2], cmd=log[1], date=log[0]) row.save() self.cmd_logs = [] return True