From 443255e70c772dfe5447a0155d1deb1671c10f46 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 8 Jan 2022 21:27:03 -0500 Subject: [PATCH] APIv3 Navigation - Add defaults so generic writeRecord can be used instead of BAO::add --- api/v3/Navigation.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/v3/Navigation.php b/api/v3/Navigation.php index c1f0cf3c67..f78fdd6cab 100644 --- a/api/v3/Navigation.php +++ b/api/v3/Navigation.php @@ -88,9 +88,11 @@ function civicrm_api3_navigation_create($params) { /** * Adjust metadata for navigation create action. * - * @param array $params + * @param array[] $fields */ -function _civicrm_api3_navigation_delete_spec(&$params) { +function _civicrm_api3_navigation_create_spec(&$fields) { + $fields['is_active']['api.default'] = TRUE; + $fields['domain_id']['api.default'] = CRM_Core_Config::domainID(); } /** -- 2.25.1