only generate findOneBySlug if required