Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.7
-
Fix Version/s: 4.1.0
-
Component/s: CiviCRM API
-
Labels:None
Description
Issue is that it's inefficient checking if 'contact_id' exists when creating a membership but if we don't do 'pre-checks' then we dont' give a useful error.
Fix is not to do a pre-check but if it fails on 'DB Constraint violation' we know a FK field is wrong & we'll find out which one & put that in the error message. (We will be able to further gut the various check_params & format_params function now we have this in place- @ this stage only removing 1 check in membership_create)