CE-1113 Avoid an NPE in doSpecHtml, if branding doesn't have an accent color

This commit is contained in:
2024-06-14 08:59:04 -05:00
parent 7ab2f332e9
commit ad07f3e1f8

View File

@ -750,7 +750,7 @@ public class QJavalinApiHandler
/////////////////////////////////
html = html.replace("{spec-url}", apiInstanceMetaData.getPath() + version + "/openapi.json");
html = html.replace("{version}", version);
html = html.replace("{primaryColor}", branding == null ? "#FF791A" : branding.getAccentColor());
html = html.replace("{primaryColor}", (branding == null || branding.getAccentColor() == null) ? "#FF791A" : branding.getAccentColor());
if(branding != null && StringUtils.hasContent(branding.getLogo()))
{