Fix the query to work with recur id but no contribution id