Dereference query when passing as a parameter

TicketSearch expects a hash, not a hash reference.