def cancel_order(form):
     order = TicketingManager.get_and_set_expiry(form.get('identifier'))
     event_id = order.event_id
     event_name = order.event.name
     invoice_id = order.get_invoice_number()
     order_url = url_for('ticketing.view_order_after_payment', order_identifier=order.identifier, _external=True)
     user = DataGetter.get_user(order.user_id)
     if login.current_user.is_organizer(event_id):
         order.status = "cancelled"
         save_to_db(order)
         send_email_after_cancel_ticket(user.email, invoice_id, order_url, event_name, form.get('note'))
         return True
     return False
 def cancel_order(form):
     order = TicketingManager.get_and_set_expiry(form.get('identifier'))
     event_id = order.event_id
     event_name = order.event.name
     invoice_id = order.get_invoice_number()
     order_url = url_for('ticketing.view_order_after_payment', order_identifier=order.identifier, _external=True)
     user = DataGetter.get_user(order.user_id)
     if login.current_user.is_organizer(event_id):
         order.status = "cancelled"
         save_to_db(order)
         send_email_after_cancel_ticket(user.email, invoice_id, order_url, event_name, form.get('note'))
         return True
     return False