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 Personalization.substitutions setter #583

Merged
merged 2 commits into from
Jun 26, 2018

Conversation

richardnias
Copy link
Contributor

Trying to set substitutions directly rather than with add_substitution was causing an infinite regress

Fixes #582

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

  • the setter for Personalization.substitutions was incorrectly referencing self.subtitutions rather than self._substitutions
  • I added a very simple testcase.

richardnias and others added 2 commits June 8, 2018 14:32
Trying to set `substitutions` directly rather than with `add_substitution` was causing an infinite regress
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Jun 8, 2018
@SendGridDX
Copy link

SendGridDX commented Jun 8, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Jun 8, 2018

Codecov Report

Merging #583 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #583     +/-   ##
=========================================
+ Coverage   86.51%   86.61%   +0.1%     
=========================================
  Files          32       32             
  Lines         979      979             
  Branches      131      131             
=========================================
+ Hits          847      848      +1     
+ Misses         68       67      -1     
  Partials       64       64
Impacted Files Coverage Δ
sendgrid/helpers/mail/personalization.py 92.68% <100%> (+1.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86708c7...2125d36. Read the comment docs.

@thinkingserious thinkingserious merged commit 01f676d into sendgrid:master Jun 26, 2018
@thinkingserious
Copy link
Contributor

Hello @richardnias,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: code review request requesting a community code review or review from Twilio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to set substitutions on Personalization helper causes infinite regress
3 participants