add defensive logic to Alias.Path, improve new GetAlias method

This commit is contained in:
sbwalker
2023-12-19 08:41:36 -05:00
parent edad4e7d35
commit 4cea22d813
2 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,7 @@ namespace Oqtane.Models
{
get
{
if (Name.Contains("/"))
if (Name != null && Name.Contains("/"))
{
return Name.Substring(Name.IndexOf("/") + 1);
}
@ -58,7 +58,7 @@ namespace Oqtane.Models
}
/// <summary>
/// Unique key used for identifying a site within a runtime process (ie. cache, etc...)
/// Unique key used for identifying a site within a runtime process (ie. cache, file system, etc...)
/// </summary>
[NotMapped]
public string SiteKey