diff --git a/dotCMS/src/main/java/com/dotcms/ai/api/DotAIAPIFacadeImpl.java b/dotCMS/src/main/java/com/dotcms/ai/api/DotAIAPIFacadeImpl.java index 268b40251e6d..a269ad8d20f6 100644 --- a/dotCMS/src/main/java/com/dotcms/ai/api/DotAIAPIFacadeImpl.java +++ b/dotCMS/src/main/java/com/dotcms/ai/api/DotAIAPIFacadeImpl.java @@ -69,7 +69,7 @@ public static class DefaultImageAPIProvider implements ImageAPIProvider { public ImageAPI getImageAPI(final Object... initArguments) { if (Objects.nonNull(initArguments) && initArguments.length >= 4 && initArguments[0] instanceof AppConfig - && initArguments[1] instanceof User + && (Objects.isNull(initArguments[1]) || initArguments[1] instanceof User) ) { final AppConfig config = (AppConfig) initArguments[0];