fixed club creation bug

This commit is contained in:
Master Kwoth 2017-09-10 17:04:32 +02:00
parent cd2a86c624
commit af334a0b5c

View File

@ -40,7 +40,9 @@ namespace NadekoBot.Services.Database.Repositories.Impl
{ {
return _set return _set
.Where(x => x.Name.ToLowerInvariant() == clubName.ToLowerInvariant()) .Where(x => x.Name.ToLowerInvariant() == clubName.ToLowerInvariant())
.Max(x => x.Discrim) + 1; .Select(x => x.Discrim)
.DefaultIfEmpty()
.Max() + 1;
} }
public ClubInfo GetByMember(ulong userId, Func<DbSet<ClubInfo>, IQueryable<ClubInfo>> func = null) public ClubInfo GetByMember(ulong userId, Func<DbSet<ClubInfo>, IQueryable<ClubInfo>> func = null)