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

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import #288

Merged
merged 2 commits into from
Jun 30, 2018
Merged

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import #288

merged 2 commits into from
Jun 30, 2018

Conversation

igallart
Copy link
Member

No description provided.

@pedrobaeza pedrobaeza added this to the 10.0 milestone Jun 22, 2018
@pedrobaeza
Copy link
Member

@ecino can you check?

Copy link
Contributor

@ecino ecino left a comment

Choose a reason for hiding this comment

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

Would be great to change error logs by warning. Otherwise the fix is good, thanks.

@@ -7,7 +7,7 @@
_logger = logging.getLogger(__name__)

try:
from sendgrid.helpers.mail.mail import TrackingSettings, \
from sendgrid.helpers.mail import TrackingSettings, \
SubscriptionTracking
except ImportError:
_logger.error("ImportError raised while loading module.")
Copy link
Contributor

Choose a reason for hiding this comment

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

While you're at it, could you replace all the import error logs by warnings? This will prevent some instances to fail when sendgrid is not installed. Please check other cases in the module as well in mail_sendgrid module. Thanks!

@ecino
Copy link
Contributor

ecino commented Jun 29, 2018

@igallart Did you have the chance to look at my suggestion?
@pedrobaeza This fix is good and will fix the non-passing tests on branch 10.

@igallart
Copy link
Member Author

@ecino, after I try do your suggestions, I don't have very time now, sorry!

@igallart
Copy link
Member Author

@ecino, correct?

@ecino
Copy link
Contributor

ecino commented Jun 29, 2018

Perfect, thanks!

Copy link
Contributor

@ecino ecino left a comment

Choose a reason for hiding this comment

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

LINT errors are in other modules, for me this pull request is good and should be merged quickly because it fixes errors in the tests.

@pedrobaeza
Copy link
Member

OK, I have fixed RST syntax problems in 1bd032d, so we can proceed with this.

@pedrobaeza pedrobaeza merged commit e638424 into OCA:10.0 Jun 30, 2018
Nooka10 pushed a commit to Nooka10/social that referenced this pull request Sep 27, 2019
Nooka10 pushed a commit to Nooka10/social that referenced this pull request Nov 15, 2019
Nooka10 pushed a commit to Nooka10/social that referenced this pull request Nov 15, 2019
Nooka10 pushed a commit to Nooka10/social that referenced this pull request Jan 6, 2020
quentingigon pushed a commit to quentingigon/social that referenced this pull request Mar 3, 2020
quentingigon pushed a commit to quentingigon/social that referenced this pull request Mar 3, 2020
quentingigon pushed a commit to quentingigon/social that referenced this pull request Mar 3, 2020
[10.0] Migrate sendgrid modules

CO-1192 The mail are now correctly sent to all recipients

Sendgrid code corrections for v10 + Add tests

Rewrite dependencies of sendgrid module fixes OCA#261

[UPD] Update mail_sendgrid.pot

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import (OCA#288)

[UPD] Update mail_sendgrid.pot

[FIX] mail_sendgrid*. Use info loglevel for import error.

Using _logger.warning for ImportError exception results in runbot/travis failures.

Add indexes to speed up performance

[IMP] use json library instead of simplejson

migrate mail_sendgrid to v11. Add support of sendgrid v3 API.

Add pre-migration script and update readme

No more commit in DB when tests are enabled

FIX: Ttracking event modify also the mail.mail status

FIX multiple body fields that were conflicting

- Instead of copying body of template to mass mailing, directly use
  the template text for mass mailings when using Sendgrid.
- If needed, the template must be edited instead of the mass mailing.
- This simplifies the code complexity

FIX flake8 issue
quentingigon pushed a commit to quentingigon/social that referenced this pull request Mar 3, 2020
[10.0] Migrate sendgrid modules

CO-1192 The mail are now correctly sent to all recipients

Sendgrid code corrections for v10 + Add tests

[UPD] Update mail_sendgrid_mass_mailing.pot

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import (OCA#288)

[FIX] mail_sendgrid*. Use info loglevel for import error.

Using _logger.warning for ImportError exception results in runbot/travis failures.

Title mistake

[UPD] Update mail_sendgrid_mass_mailing.pot

[FIX] don't use sendgrid v6.0.0 as the code is made for lower versions

FIX multiple body fields that were conflicting

- Instead of copying body of template to mass mailing, directly use
  the template text for mass mailings when using Sendgrid.
- If needed, the template must be edited instead of the mass mailing.
- This simplifies the code complexity

[UPD] Update mail_sendgrid_mass_mailing.pot

[MIG] mail_sendgrid_mass_mailing: Migration to 11.0
ecino pushed a commit to CompassionCH/social that referenced this pull request Mar 4, 2020
quentingigon pushed a commit to quentingigon/social that referenced this pull request Mar 4, 2020
[10.0] Migrate sendgrid modules

CO-1192 The mail are now correctly sent to all recipients

Sendgrid code corrections for v10 + Add tests

[UPD] Update mail_sendgrid_mass_mailing.pot

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import (OCA#288)

[FIX] mail_sendgrid*. Use info loglevel for import error.

Using _logger.warning for ImportError exception results in runbot/travis failures.

Title mistake

[UPD] Update mail_sendgrid_mass_mailing.pot

[FIX] don't use sendgrid v6.0.0 as the code is made for lower versions

FIX multiple body fields that were conflicting

- Instead of copying body of template to mass mailing, directly use
  the template text for mass mailings when using Sendgrid.
- If needed, the template must be edited instead of the mass mailing.
- This simplifies the code complexity

[UPD] Update mail_sendgrid_mass_mailing.pot

[MIG] mail_sendgrid_mass_mailing: Migration to 11.0
JonathanGuerne pushed a commit to JonathanGuerne/social that referenced this pull request Jun 8, 2021
[10.0] Migrate sendgrid modules

CO-1192 The mail are now correctly sent to all recipients

Sendgrid code corrections for v10 + Add tests

[UPD] Update mail_sendgrid_mass_mailing.pot

[10.0][FIX] mail_sendgrid_mass_mailing: Bad import (OCA#288)

[FIX] mail_sendgrid*. Use info loglevel for import error.

Using _logger.warning for ImportError exception results in runbot/travis failures.

Title mistake

[UPD] Update mail_sendgrid_mass_mailing.pot

[FIX] don't use sendgrid v6.0.0 as the code is made for lower versions

FIX multiple body fields that were conflicting

- Instead of copying body of template to mass mailing, directly use
  the template text for mass mailings when using Sendgrid.
- If needed, the template must be edited instead of the mass mailing.
- This simplifies the code complexity

[UPD] Update mail_sendgrid_mass_mailing.pot

[MIG] mail_sendgrid_mass_mailing: Migration to 11.0
em230418 pushed a commit to em230418/social that referenced this pull request Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants