Merge pull request #1199 from totten/master-premature-commit
[civicrm-core.git] / api / v3 / PriceFieldValue.php
index 8aae82c36d642b957de18358ef17969d08cc755a..684c3cd1623766f98b59380294901e1ac2b4dd3b 100644 (file)
@@ -52,7 +52,7 @@ function civicrm_api3_price_field_value_create($params) {
     $ids['id'] = $params['id'];
   }
 
-  $bao = CRM_Price_BAO_FieldValue::create($params, $ids);
+  $bao = CRM_Price_BAO_PriceFieldValue::create($params, $ids);
 
   $values = array();
   _civicrm_api3_object_to_array($bao, $values[$bao->id]);
@@ -67,6 +67,7 @@ function civicrm_api3_price_field_value_create($params) {
  * @param array $params array or parameters determined by getfields
  */
 function _civicrm_api3_price_field_value_create_spec(&$params) {
+  $params['price_field_id']['api.required'] = TRUE;
 }
 
 /**