From 375ee9d764478fe6d2cf646a309863ebdf66e2cf Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 24 Mar 2016 19:14:50 +0700 Subject: [PATCH] Removes stage/region existence check from `toObjectPopulated(options)` --- lib/Project.js | 3 --- lib/Resources.js | 3 --- 2 files changed, 6 deletions(-) diff --git a/lib/Project.js b/lib/Project.js index 4ec082c24..61e9bc871 100644 --- a/lib/Project.js +++ b/lib/Project.js @@ -46,9 +46,6 @@ module.exports = function(S) { toObjectPopulated(options) { options = options || {}; - // Validate: Check Stage & Region - if (!options.stage || !options.region) throw new SError('Both "stage" and "region" params are required'); - // Validate: Check project path is set if (!S.hasProject()) throw new SError('Function could not be populated because no project path has been set on Serverless instance'); diff --git a/lib/Resources.js b/lib/Resources.js index 56c05eb12..d5b00bd82 100644 --- a/lib/Resources.js +++ b/lib/Resources.js @@ -107,9 +107,6 @@ module.exports = function(S) { toObjectPopulated(options) { options = options || {}; - // Validate: Check Stage & Region - if (!options.stage || !options.region) throw new SError('Both "stage" and "region" params are required'); - // Validate: Check project path is set if (!S.hasProject()) throw new SError('Resources could not be populated because no project path has been set on Serverless instance');