user_id and group_id don't belong on query
change logic so that it's not expecting user_id or group_id to be on the query object