Add default for domain_id for report_instance.
authoreileen <emcnaughton@wikimedia.org>
Wed, 9 Jan 2019 05:11:35 +0000 (18:11 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 9 Jan 2019 05:11:35 +0000 (18:11 +1300)
This is consistent with other api like Job, MembershipType, PaymentProcessor

api/v3/ReportInstance.php

index 5e4b000d19b783836620b34ed14003758583e96a..9aa67bc356955def9275ed8bc5e1035deaef6da9 100644 (file)
@@ -67,6 +67,7 @@ function civicrm_api3_report_instance_create($params) {
 function _civicrm_api3_report_instance_create_spec(&$params) {
   $params['report_id']['api.required'] = 1;
   $params['title']['api.required'] = 1;
+  $params['domain_id']['api.default'] = CRM_Core_Config::domainID();
   $params['view_mode']['api.default'] = 'view';
   $params['view_mode']['title'] = ts('View Mode for Navigation URL');
   $params['view_mode']['type'] = CRM_Utils_Type::T_STRING;