- // If we are adding option group via UI it should not be marked reserved.
- if (!isset($params['is_reserved'])) {
- $params['is_reserved'] = 0;
+ 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;
+ }