Skip to content

Commit

Permalink
Add 'fileName' to condition when checking request for logo file.
Browse files Browse the repository at this point in the history
  • Loading branch information
youngcaseho authored and bdukes committed Oct 15, 2019
1 parent f19a881 commit 8c89637
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,14 @@ public HttpResponseMessage UpdatePortalSettings(UpdateSiteSettingsRequest reques
var portalInfo = PortalController.Instance.GetPortal(pid, cultureCode);
portalInfo.PortalName = request.PortalName;

if (request.LogoFile != null && request.LogoFile.fileId != Null.NullInteger)
if (request.LogoFile != null && request.LogoFile.fileId != Null.NullInteger && !String.IsNullOrEmpty(request.LogoFile.fileName))
{
portalInfo.LogoFile = FileManager.Instance.GetFile(request.LogoFile.fileId).RelativePath;
}
else // Set LogoFile to blank when no file is specified.
{
portalInfo.LogoFile = string.Empty;
}

portalInfo.FooterText = request.FooterText;
portalInfo.Description = request.Description;
Expand Down

0 comments on commit 8c89637

Please sign in to comment.