If the ShortViewService is not found, don't crash.
This commit is contained in:
parent
2a73c96b1d
commit
f839583068
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ public class IndividualShortViewDirective extends BaseTemplateDirectiveModel {
|
||||||
VitroRequest vreq = new VitroRequest(
|
VitroRequest vreq = new VitroRequest(
|
||||||
(HttpServletRequest) env.getCustomAttribute("request"));
|
(HttpServletRequest) env.getCustomAttribute("request"));
|
||||||
ShortViewService svs = ShortViewServiceSetup.getService(ctx);
|
ShortViewService svs = ShortViewServiceSetup.getService(ctx);
|
||||||
|
if (svs == null) {
|
||||||
|
log.warn("ShortViewService was not initialized properly.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TemplateAndSupplementalData svInfo = svs.getShortViewInfo(individual,
|
TemplateAndSupplementalData svInfo = svs.getShortViewInfo(individual,
|
||||||
svContext, vreq);
|
svContext, vreq);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue