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

Fix bug where getsingle calls chained actions twice #13406

Merged
merged 2 commits into from
Jan 5, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fix bug where getsingle calls chained actions twice

Before

When calling

$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
      'id' => $contribution['id'],
      'api.contribution.delete' => 1,
    ));

the delete is called twice

After

$contribution = $this->callAPISuccess('contribution', 'getsingle', array(
      'id' => $contribution['id'],
      'api.contribution.delete' => 1,
    ));

the delete is called once

Technical Details

A bit hacky but I don't want to go too far down this rabbit hole & I did manage to get in a test

Comments

@civibot
Copy link

civibot bot commented Jan 4, 2019

(Standard links)

@civibot civibot bot added the master label Jan 4, 2019
@seamuslee001
Copy link
Contributor

This is a bit hacky but it is limited to getsingle actions and it has a test which has passed. On balance i think this is better in rather than out. Merging

@seamuslee001 seamuslee001 merged commit 2a8edd9 into civicrm:master Jan 5, 2019
@eileenmcnaughton eileenmcnaughton deleted the api_getsingle branch January 6, 2019 20:45
@eileenmcnaughton
Copy link
Contributor Author

thanks @seamuslee001 - I didn't want to do that fix so I'm glad having done it it's merged :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants