0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Merge pull request #3741 from ErisDS/owner-user

Fix for bug where owner user has name owner
This commit is contained in:
Sebastian Gierlinger 2014-08-11 12:08:28 +02:00
commit 676c4ab824

View file

@ -403,7 +403,7 @@ User = ghostBookshelf.Model.extend({
return user.roles().fetch().then(function (roles) {
// return if the role is already assigned
if (roles.models[0].id === roleId) {
return user;
return;
}
return Role.findOne({id: roleId});
}).then(function (roleToAssign) {