'Returns True if ticket has already placed orders.
Else False.'

def has_order_tickets(self):

    from app.api.helpers.db import get_count
    orders = Order.id.in_(OrderTicket.query.with_entities(OrderTicket.order_id).filter_by(ticket_id=self.id).all())
    count = get_count(Order.query.filter(orders).filter((Order.status != 'deleted')))
    return bool((count > 0))
