From: Sudha Bisht Date: Fri, 12 Jun 2015 09:50:35 +0000 (+0530) Subject: Fix for custom field edit X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0081aa41b0477d0e3421e277afb059ff5f2f196c;p=civicrm-core.git Fix for custom field edit --- diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 68da010324..c4abb3ccf5 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -203,7 +203,8 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { 'table_name' ); - if ($params['option_type'] == 1 && empty($params['option_group_id'])) { + //CRM-16659: if option_value then create an option group for the field. + if ($params['option_type'] == 1 && !empty($params['option_value'])) { // first create an option group for this custom group $optionGroup = new CRM_Core_DAO_OptionGroup(); $optionGroup->name = "{$columnName}_" . date('YmdHis');