Browse Source

Make sure the provided models actually exist.

pull/334/head
Nigel Banks 12 years ago
parent
commit
740720124d
  1. 6
      includes/ingest.form.inc

6
includes/ingest.form.inc

@ -78,6 +78,12 @@ function islandora_ingest_form_init_form_state_storage(array &$form_state, array
if (empty($objects)) {
$objects[] = islandora_ingest_form_prepare_new_object($configuration);
}
// Make sure the models actually exist
foreach ($configuration['models'] as $key => $model) {
if (!islandora_object_load($model)) {
unset($configuration['models'][$key]);
}
}
// No need to persist the 'objects' within the configuration.
unset($configuration['objects']);
// Required for step hooks.

Loading…
Cancel
Save