diff --git a/includes/tripal_manage_analyses.fields.inc b/includes/tripal_manage_analyses.fields.inc index 7872e9f..7640c33 100644 --- a/includes/tripal_manage_analyses.fields.inc +++ b/includes/tripal_manage_analyses.fields.inc @@ -139,7 +139,7 @@ function tripal_manage_analyses_bundle_fields_info($entity_type, $bundle) $fields[$field_name] = [ 'field_name' => $field_name, 'type' => $field_type, - 'cardinality' => 1, + 'cardinality' => FIELD_CARDINALITY_UNLIMITED, 'locked' => FALSE, 'storage' => [ 'type' => 'field_chado_storage', diff --git a/tripal_manage_analyses.install b/tripal_manage_analyses.install index 0fc0199..15d1559 100644 --- a/tripal_manage_analyses.install +++ b/tripal_manage_analyses.install @@ -129,3 +129,17 @@ function tripal_manage_analyses_update_7306() { ]); } + +/** + * Implements hook_update_n + * + * Adjusts the cardinality for the local__analysis_browser field to unlimited. + * In code, this is "FIELD_CARDINALITY_UNLIMITED", and in the database, it is represented by -1 in the cardinality column. + */ +function tripal_manage_analyses_update_7307() { + // Update the field_config table. + db_update('field_config') + ->fields(array('cardinality' => -1)) + ->condition('field_name', 'local__analysis_browser') + ->execute(); +} \ No newline at end of file