Merge pull request #1665 from eordano/fix/FailIfProfileExists

Fail if profile already exists
This commit is contained in:
Matias Alejo Garcia 2014-10-31 18:20:43 -03:00
commit ea6a2fbc25

View file

@ -86,7 +86,7 @@ Identity.create = function(opts, cb) {
opts = _.extend({}, opts);
var iden = new Identity(opts);
iden.store(opts, function(err) {
iden.store(_.extend(opts, {failIfExists: true}), function(err) {
if (err) return cb(err);
return cb(null, iden);
});