def error_ticket(ticket_uuid): if MODE != "demo": return dict( ticket=safely( lambda: error_logger.database_logger.get(ticket_uuid=ticket_uuid) ) ) else: return dict(ticket=None)
def clear_tickets(): if MODE != "demo": safely(error_logger.database_logger.clear)
def tickets(): """Returns most recent tickets grouped by path+error""" tickets = safely(error_logger.database_logger.get) if MODE != "DEMO" else None return {"payload": tickets or []}