def create_rt_ticket(endpoint, pid_value): """View to create an rt ticket""" json = request.json ticket_id = tickets.create_ticket(json['queue'], current_user.email, json.get('description'), json.get('subject'), pid_value, Owner=json.get('owner')) if ticket_id != -1: return jsonify(success=True, data={ 'id': str(ticket_id), 'link': tickets.get_rt_link_for_ticket(ticket_id) }) else: return jsonify(success=False), 500
def create_rt_ticket(endpoint, pid_value): """View to create an rt ticket""" json = request.json ticket_id = tickets.create_ticket(json['queue'], current_user.email, json.get('description'), json.get('subject'), pid_value, Owner=json.get('owner')) if ticket_id != -1: return jsonify( success=True, data={ 'id': str(ticket_id), 'link': tickets.get_rt_link_for_ticket(ticket_id) } ) else: return jsonify(success=False), 500