Ver código fonte

validate config driver if set

tags/v0.9.12
Jonathan Cobb 4 anos atrás
pai
commit
15c9891ed5
1 arquivos alterados com 8 adições e 0 exclusões
  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 Ver arquivo

@@ -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);
}



Carregando…
Cancelar
Salvar