Fixed permission bug

This commit is contained in:
Kwoth 2016-12-13 23:10:45 +01:00
parent 2f8511c401
commit 477071640f

View File

@ -122,9 +122,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl
public GuildConfig SetNewRootPermission(ulong guildId, Permission p)
{
var data = _set
.Include(gc => gc.RootPermission)
.FirstOrDefault(gc => gc.GuildId == guildId);
var data = PermissionsFor(guildId);
data.RootPermission.Prepend(p);
data.RootPermission = p;