Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Remove handling for relationshipID #22391

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 6, 2022

Overview

[REF] Remove handling for relationshipID

Before

This function is only called from one place and that place does not pass in $params['id'] - however there is a shonk-load of handling 'just in case'

After

poof

Technical Details

$relationshipParams in these lines is where id is NOT passed in from

// create employee of relationship
$relationshipParams = [
'is_active' => TRUE,
'relationship_type_id' => $relTypeId . '_a_b',
'contact_check' => [$organization => TRUE],
];
[$valid, $invalid, $duplicate, $saved, $relationshipIds]
= self::legacyCreateMultiple($relationshipParams, $contactID);

Comments

We can see that the only call to this function does not set params['id'] & hence it is NULL
@civibot
Copy link

civibot bot commented Jan 6, 2022

(Standard links)

@civibot civibot bot added the master label Jan 6, 2022
@eileenmcnaughton
Copy link
Contributor Author

test this please

@eileenmcnaughton eileenmcnaughton merged commit adc8295 into civicrm:master Jan 7, 2022
@eileenmcnaughton eileenmcnaughton deleted the legacy branch January 7, 2022 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants