diff --git a/lib/metadataTypes/Query.js b/lib/metadataTypes/Query.js index 3c0946f58..ba3b2d27b 100644 --- a/lib/metadataTypes/Query.js +++ b/lib/metadataTypes/Query.js @@ -369,6 +369,7 @@ class Query extends MetadataType { * @returns {boolean} deletion success status */ static async deleteByKey(customerKey) { + // delete only works with the query's object id const objectId = customerKey ? await this._getObjectIdForSingleRetrieve(customerKey) : null; if (!objectId) { Util.logger.error(` - query not found`);