only select the id in the findOne query

This commit is contained in:
Dieter Stinglhamber 2021-11-25 16:42:27 +01:00
parent 282a688482
commit d3de1ca7be

View File

@ -79,7 +79,7 @@ const addUniqueValidator = (attr, validator, { uid, attributeName, entityId }) =
: { [attributeName]: value };
const record = await strapi.db.query(uid).findOne({
select: ['id', attributeName],
select: ['id'],
where: whereParams,
});