From 477071640feecc8e1cb07adfbe6ea9313a7f66ae Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 13 Dec 2016 23:10:45 +0100 Subject: [PATCH] Fixed permission bug --- .../Database/Repositories/Impl/GuildConfigRepository.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs index 957f40a2..02c287f3 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/GuildConfigRepository.cs @@ -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;