+ if ($this->_action & CRM_Core_Action::ADD) {
+ // If we are adding option group via UI it should not be marked reserved.
+ if (!isset($params['is_reserved'])) {
+ $params['is_reserved'] = 0;
+ }
+ }
+ elseif ($this->_action & CRM_Core_Action::UPDATE) {
+ $params['id'] = $this->_id;