Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 532014 - Do not try to recreate admin user if they already exist.
  • Loading branch information
mrennie committed Mar 5, 2018
1 parent 7ad4fa9 commit 3bb4d3a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions modules/orionode/lib/metastore/util/metaUtil.js
Expand Up @@ -33,11 +33,16 @@ module.exports.initializeAdminUser = function initializeAdminUser(options, store
password: pw,
properties:{}
};
return store.createUser(userData, function(err, user) {
if(err) {
return reject(err);
return store.getUser("admin", function(err, user) {
if(user) {
return resolve(user);
}
return resolve(user);
return store.createUser(userData, function(err, user) {
if(err) {
return reject(err);
}
return resolve(user);
});
});
}
return resolve({});
Expand Down

0 comments on commit 3bb4d3a

Please sign in to comment.