Fail if profile already exists
This commit is contained in:
parent
f1b7d11eec
commit
5a8c93284b
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ Identity.create = function(opts, cb) {
|
||||||
opts = _.extend({}, opts);
|
opts = _.extend({}, opts);
|
||||||
|
|
||||||
var iden = new Identity(opts);
|
var iden = new Identity(opts);
|
||||||
iden.store(opts, function(err) {
|
iden.store(_.extend(opts, {failIfExists: true}), function(err) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
return cb(null, iden);
|
return cb(null, iden);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue