Skip to content

Commit

Permalink
Use constant for the setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
juanluisrp committed Aug 7, 2020
1 parent 9cc7a4c commit 889717a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ public AbstractMetadata insertMetadata(ServiceContext context, AbstractMetadata
String mdImportSetting = settingManager.getValue(Settings.METADATA_IMPORT_RESTRICT);
if (mdImportSetting != null && !mdImportSetting.equals("")) {
if (!newMetadata.getHarvestInfo().isHarvested() && !Arrays.asList(mdImportSetting.split(",")).contains(schema)) {
throw new IllegalArgumentException("The system setting 'metadata/import/restrict' doesn't allow to import " + schema
throw new IllegalArgumentException("The system setting '" + Settings.METADATA_IMPORT_RESTRICT
+ "' doesn't allow to import " + schema
+ " metadata records (they can still be harvested). "
+ "Apply an import stylesheet to convert file to one of the allowed schemas: " + mdImportSetting);
}
Expand Down

0 comments on commit 889717a

Please sign in to comment.