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

Prevent exception if no contacts are found with getEntities #3785

Merged

Conversation

alanhartless
Copy link
Contributor

Q A
Bug fix? y
New feature?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

If there are not contacts, such as after a contact has been deleted with the campaign action, a SQL error is thrown because it tries to query with an empty in() statement for companies and frequency rules.

Steps to reproduce the bug:

  1. Create a campaign with just the delete contact action
  2. Run the campaign

Steps to test this PR:

  1. No exception should be thrown
  2. Send an email with dynamic web content setup using company filters. Ensure that the received emails have appropriate content to the company based filters.

@alanhartless alanhartless added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Mar 31, 2017
@alanhartless alanhartless added this to the 2.8.0 milestone Mar 31, 2017
@escopecz escopecz self-assigned this Apr 6, 2017
@dongilbert dongilbert self-assigned this Apr 6, 2017
Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No exception thrown. Thanks! 👍

@escopecz escopecz added the pending-test-confirmation PR's that require one test before they can be merged label Apr 10, 2017
@dongilbert
Copy link
Member

+1 Thanks!

@dongilbert dongilbert merged commit f8c3a14 into mautic:staging Apr 11, 2017
@alanhartless alanhartless deleted the bug-empty-contacts-exception branch July 24, 2017 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs pending-test-confirmation PR's that require one test before they can be merged ready-to-test PR's that are ready to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants