Browse Source

Merge pull request #1206 from dsenalik/1205-tv3-bulkloader

fix for issue #1205 bug, can't delete first record in template
Stephen Ficklin 3 năm trước cách đây
mục cha
commit
45c1c6227e

+ 1 - 1
tripal_bulk_loader/includes/tripal_bulk_loader.admin.templates.inc

@@ -1306,7 +1306,7 @@ function tripal_bulk_loader_delete_template_record_form($form, &$form_state) {
     tripal_set_message('Unable to determine the template_id from the path.', TRIPAL_ERROR);
     return $form;
   }
-  elseif (!$record_id) {
+  elseif (!isset($record_id)) {
     tripal_set_message('Unable to determine the record_id from the path.', TRIPAL_ERROR);
     return $form;
   }

+ 0 - 2
tripal_bulk_loader/includes/tripal_bulk_loader.loader.inc

@@ -539,12 +539,10 @@ function process_data_array_for_line($priority, &$data, &$default_data, $addt) {
   // an error
   $skip_optional = 0;
   foreach ($table_data['required'] as $field => $required) {
-
     if ($required) {
       // check if the field has no value (or array is empty)
       if (!isset($values[$field]) or
         (is_array($values[$field]) and count($values[$field]) == 0)) {
-
         // check if the record is optional.  For backwards compatiblity we need to
         // check if the 'mode' is set to 'optional'
         if ($table_data['optional'] or preg_match('/optional/', $table_data['mode']) or