fix small issue with new toggle

This commit is contained in:
RaidMax 2021-08-14 20:43:20 -05:00
parent a6b0911af9
commit 7e1221f467

View File

@ -321,7 +321,8 @@ namespace SharedLibraryCore.Services
var name = originalName.CapClientName(EFAlias.MAX_NAME_LENGTH); var name = originalName.CapClientName(EFAlias.MAX_NAME_LENGTH);
var existingAliases = await context.Aliases var existingAliases = await context.Aliases
.Where(alias => alias.Name == name && alias.LinkId == entity.AliasLinkId) .Where(alias => alias.Name == name && alias.LinkId == entity.AliasLinkId ||
alias.Name == name && alias.IPAddress != null && alias.IPAddress == ip)
.ToListAsync(); .ToListAsync();
var defaultAlias = existingAliases.FirstOrDefault(alias => alias.IPAddress == null); var defaultAlias = existingAliases.FirstOrDefault(alias => alias.IPAddress == null);
var existingExactAlias = var existingExactAlias =