mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	Fixed .logserver - should no longer throw an exception if you had no logsettings previously
This commit is contained in:
		@@ -120,6 +120,15 @@ namespace NadekoBot.Db
 | 
			
		||||
                .Include(x => x.IgnoredChannels)
 | 
			
		||||
                .Where(x => x.GuildId == guildId)
 | 
			
		||||
                .FirstOrDefault();
 | 
			
		||||
 | 
			
		||||
            if (logSetting is null)
 | 
			
		||||
            {
 | 
			
		||||
                ctx.LogSettings.Add(logSetting = new ()
 | 
			
		||||
                {
 | 
			
		||||
                    GuildId = guildId
 | 
			
		||||
                });
 | 
			
		||||
                ctx.SaveChanges();
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            return logSetting;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user