I have gone through several times, however I'm unable to understand why this error is getting.
Discussion posts and replies are publicly visible
getVendorId rule return more than 1 integer value and while filtering out the data you are using "=" operator. Could you please try by using 'in' operator in your query filter. or use index function over the getVendorId function to get only 1 data.