diff --git a/admin/server/api/list/delete.js b/admin/server/api/list/delete.js index 53a966d1af..c5fdde2128 100644 --- a/admin/server/api/list/delete.js +++ b/admin/server/api/list/delete.js @@ -38,6 +38,7 @@ module.exports = function (req, res) { return res.apiError('database error', err); } async.forEachLimit(results, 10, function (item, next) { + item._req_user = req.user; item.remove(function (err) { if (err) return next(err); deletedCount++; diff --git a/fields/types/cloudinaryimages/CloudinaryImagesType.js b/fields/types/cloudinaryimages/CloudinaryImagesType.js index 6e52cc53d3..25231393f1 100644 --- a/fields/types/cloudinaryimages/CloudinaryImagesType.js +++ b/fields/types/cloudinaryimages/CloudinaryImagesType.js @@ -114,8 +114,8 @@ cloudinaryimages.prototype.addToSchema = function (schema) { }); var src = function (img, options) { + options = options || {}; if (keystone.get('cloudinary secure')) { - options = options || {}; options.secure = true; } options.format = options.format || img.format;