Browse Source

Issue 1764346 #1: small fix so that the edit field check works properly.

Lacey Sanderson 12 years ago
parent
commit
72e2638b60
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tripal_bulk_loader/tripal_bulk_loader.admin.templates.inc

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

@@ -2292,7 +2292,8 @@ function tripal_bulk_loader_edit_template_field_form_validate($form, $form_state
       $form_state['values']['template_id'],
       $form_state['values']['template_id'],
       $form_state['storage']['template_array']
       $form_state['storage']['template_array']
     );
     );
-    if (!$is_unique) {
+    $new_record = ($form_state['values']['field_group'] == 'NEW') ? TRUE : FALSE;
+    if ((!$is_unique) AND $new_record) {
       form_set_error('record_name', "New Record Name must be unique. '" . $form_state['values']['record_name'] . "' is not unique.");
       form_set_error('record_name', "New Record Name must be unique. '" . $form_state['values']['record_name'] . "' is not unique.");
     }
     }
   }
   }