diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs index 0977e3bf..8caa1838 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs @@ -32,6 +32,7 @@ namespace NadekoBot.Services.Database.Repositories.Impl .Include(x => x.Applicants) .ThenInclude(x => x.User) .Include(x => x.Owner) + .Include(x => x.Users) .FirstOrDefault(x => x.Owner.UserId == userId) ?? _context.Set() .Include(x => x.Club) diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs index 5238198d..933d583b 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/DiscordUserRepository.cs @@ -42,12 +42,12 @@ namespace NadekoBot.Services.Database.Repositories.Impl { if (!_set.Where(y => y.UserId == id).Any()) { - return _set.Count(); + return _set.Count() + 1; } return _set.Count(x => x.TotalXp >= _set.Where(y => y.UserId == id) .DefaultIfEmpty() - .Sum(y => y.TotalXp)) + 1; + .Sum(y => y.TotalXp)); } public DiscordUser[] GetUsersXpLeaderboardFor(int page)