feat: fix bug that organization might be nil in some case and cause nil point error (#3608)

This commit is contained in:
DacongDA 2025-02-21 23:43:30 +08:00 committed by GitHub
parent f26b4853c5
commit 24ab8880cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,11 +106,14 @@ func getOrganizationThemeCookieFromUrlPath(ctx *context.Context, urlPath string)
} }
organizationThemeCookie := &OrganizationThemeCookie{ organizationThemeCookie := &OrganizationThemeCookie{
application.ThemeData, ThemeData: application.ThemeData,
application.Logo, LogoUrl: application.Logo,
application.FooterHtml, FooterHtml: application.FooterHtml,
organization.Favicon, }
organization.DisplayName,
if organization != nil {
organizationThemeCookie.Favicon = organization.Favicon
organizationThemeCookie.DisplayName = organization.DisplayName
} }
return organizationThemeCookie, nil return organizationThemeCookie, nil