浏览代码

validate config driver if set

tags/v0.9.12
Jonathan Cobb 4 年前
父节点
当前提交
15c9891ed5
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. +8
    -0
      bubble-server/src/main/java/bubble/resources/app/AppsResourceBase.java

+ 8
- 0
bubble-server/src/main/java/bubble/resources/app/AppsResourceBase.java 查看文件

@@ -9,6 +9,7 @@ import bubble.dao.app.AppRuleDAO;
import bubble.dao.app.BubbleAppDAO;
import bubble.model.account.Account;
import bubble.model.app.BubbleApp;
import bubble.model.app.config.AppConfigDriver;
import bubble.model.app.config.AppDataConfig;
import bubble.model.app.config.AppDataDriver;
import bubble.model.app.config.AppDataPresentation;
@@ -51,6 +52,13 @@ public abstract class AppsResourceBase extends AccountOwnedTemplateResource<Bubb
if (!dataConfig.hasViews()) throw invalidEx("err.dataConfig.views.required");
if (!dataConfig.hasFields()) throw invalidEx("err.dataConfig.fields.required");
}
if (dataConfig.hasConfigDriver()) {
try {
final AppConfigDriver configDriver = dataConfig.getConfigDriver(configuration);
} catch (Exception e) {
throw invalidEx("err.dataConfig.configDriver.invalid", "Error initializing config driver: "+shortError(e), dataConfig.getDataDriver());
}
}
return super.setReferences(ctx, caller, request);
}



正在加载...
取消
保存