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

send_receipt: handle email backend returning None #390

Merged
merged 4 commits into from Oct 25, 2017

Conversation

Projects
None yet
3 participants
@blueyed
Contributor

blueyed commented Oct 9, 2017

TODO:

  • test
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          31       31           
  Lines        1302     1302           
  Branches       98       98           
=======================================
  Hits         1300     1300           
  Partials        2        2
Flag Coverage Δ
#py27dj110 99.38% <100%> (ø) ⬆️
#py27dj111 99.38% <100%> (ø) ⬆️
#py27dj18 99.76% <100%> (ø) ⬆️
#py27dj19 99.76% <100%> (ø) ⬆️
#py33dj18 99.76% <100%> (ø) ⬆️
#py34dj110 99.38% <100%> (ø) ⬆️
#py34dj111 99.38% <100%> (ø) ⬆️
#py34dj18 99.76% <100%> (ø) ⬆️
#py34dj19 99.76% <100%> (ø) ⬆️
#py35dj110 99.38% <100%> (ø) ⬆️
#py35dj111 99.38% <100%> (ø) ⬆️
#py35dj18 99.76% <100%> (ø) ⬆️
#py35dj19 99.76% <100%> (ø) ⬆️
#py35djmaster 99.38% <100%> (ø) ⬆️
#py36dj111 99.38% <100%> (ø) ⬆️
#py36djmaster 99.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 96.55% <100%> (ø) ⬆️

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 1227831...bcb5fa0. Read the comment docs.

codecov bot commented Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          31       31           
  Lines        1302     1302           
  Branches       98       98           
=======================================
  Hits         1300     1300           
  Partials        2        2
Flag Coverage Δ
#py27dj110 99.38% <100%> (ø) ⬆️
#py27dj111 99.38% <100%> (ø) ⬆️
#py27dj18 99.76% <100%> (ø) ⬆️
#py27dj19 99.76% <100%> (ø) ⬆️
#py33dj18 99.76% <100%> (ø) ⬆️
#py34dj110 99.38% <100%> (ø) ⬆️
#py34dj111 99.38% <100%> (ø) ⬆️
#py34dj18 99.76% <100%> (ø) ⬆️
#py34dj19 99.76% <100%> (ø) ⬆️
#py35dj110 99.38% <100%> (ø) ⬆️
#py35dj111 99.38% <100%> (ø) ⬆️
#py35dj18 99.76% <100%> (ø) ⬆️
#py35dj19 99.76% <100%> (ø) ⬆️
#py35djmaster 99.38% <100%> (ø) ⬆️
#py36dj111 99.38% <100%> (ø) ⬆️
#py36djmaster 99.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 96.55% <100%> (ø) ⬆️

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 1227831...bcb5fa0. Read the comment docs.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          31       31           
  Lines        1302     1302           
  Branches       98       98           
=======================================
  Hits         1300     1300           
  Partials        2        2
Flag Coverage Δ
#py27dj110 99.38% <100%> (ø) ⬆️
#py27dj111 99.38% <100%> (ø) ⬆️
#py27dj18 99.76% <100%> (ø) ⬆️
#py27dj19 99.76% <100%> (ø) ⬆️
#py33dj18 99.76% <100%> (ø) ⬆️
#py34dj110 99.38% <100%> (ø) ⬆️
#py34dj111 99.38% <100%> (ø) ⬆️
#py34dj18 99.76% <100%> (ø) ⬆️
#py34dj19 99.76% <100%> (ø) ⬆️
#py35dj110 99.38% <100%> (ø) ⬆️
#py35dj111 99.38% <100%> (ø) ⬆️
#py35dj18 99.76% <100%> (ø) ⬆️
#py35dj19 99.76% <100%> (ø) ⬆️
#py35djmaster 99.38% <100%> (ø) ⬆️
#py36dj111 99.38% <100%> (ø) ⬆️
#py36djmaster 99.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 96.55% <100%> (ø) ⬆️

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 1227831...bcb5fa0. Read the comment docs.

codecov bot commented Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          31       31           
  Lines        1302     1302           
  Branches       98       98           
=======================================
  Hits         1300     1300           
  Partials        2        2
Flag Coverage Δ
#py27dj110 99.38% <100%> (ø) ⬆️
#py27dj111 99.38% <100%> (ø) ⬆️
#py27dj18 99.76% <100%> (ø) ⬆️
#py27dj19 99.76% <100%> (ø) ⬆️
#py33dj18 99.76% <100%> (ø) ⬆️
#py34dj110 99.38% <100%> (ø) ⬆️
#py34dj111 99.38% <100%> (ø) ⬆️
#py34dj18 99.76% <100%> (ø) ⬆️
#py34dj19 99.76% <100%> (ø) ⬆️
#py35dj110 99.38% <100%> (ø) ⬆️
#py35dj111 99.38% <100%> (ø) ⬆️
#py35dj18 99.76% <100%> (ø) ⬆️
#py35dj19 99.76% <100%> (ø) ⬆️
#py35djmaster 99.38% <100%> (ø) ⬆️
#py36dj111 99.38% <100%> (ø) ⬆️
#py36djmaster 99.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 96.55% <100%> (ø) ⬆️

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 1227831...bcb5fa0. Read the comment docs.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files          34       34           
  Lines        1662     1662           
  Branches      135      135           
=======================================
  Hits         1652     1652           
  Misses          5        5           
  Partials        5        5
Flag Coverage Δ
#py27dj110 99.39% <100%> (ø) ⬆️
#py27dj111 99.39% <100%> (ø) ⬆️
#py27dj18 99.39% <100%> (ø) ⬆️
#py34dj110 99.39% <100%> (ø) ⬆️
#py34dj111 99.39% <100%> (ø) ⬆️
#py34dj18 99.39% <100%> (ø) ⬆️
#py34dj20 99.39% <100%> (ø) ⬆️
#py35dj110 99.39% <100%> (ø) ⬆️
#py35dj111 99.39% <100%> (ø) ⬆️
#py35dj18 99.39% <100%> (ø) ⬆️
#py35dj20 99.39% <100%> (ø) ⬆️
#py36dj111 99.39% <100%> (ø) ⬆️
#py36dj20 99.39% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 100% <100%> (ø) ⬆️

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 6a1f3b8...7ad363b. Read the comment docs.

codecov bot commented Oct 9, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #390   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files          34       34           
  Lines        1662     1662           
  Branches      135      135           
=======================================
  Hits         1652     1652           
  Misses          5        5           
  Partials        5        5
Flag Coverage Δ
#py27dj110 99.39% <100%> (ø) ⬆️
#py27dj111 99.39% <100%> (ø) ⬆️
#py27dj18 99.39% <100%> (ø) ⬆️
#py34dj110 99.39% <100%> (ø) ⬆️
#py34dj111 99.39% <100%> (ø) ⬆️
#py34dj18 99.39% <100%> (ø) ⬆️
#py34dj20 99.39% <100%> (ø) ⬆️
#py35dj110 99.39% <100%> (ø) ⬆️
#py35dj111 99.39% <100%> (ø) ⬆️
#py35dj18 99.39% <100%> (ø) ⬆️
#py35dj20 99.39% <100%> (ø) ⬆️
#py36dj111 99.39% <100%> (ø) ⬆️
#py36dj20 99.39% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/hooks.py 100% <100%> (ø) ⬆️

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 6a1f3b8...7ad363b. Read the comment docs.

@@ -51,7 +51,7 @@ def send_receipt(self, charge, email=None):
to=[email],
from_email=settings.PINAX_STRIPE_INVOICE_FROM_EMAIL
).send()
charge.receipt_sent = num_sent > 0
charge.receipt_sent = num_sent and num_sent > 0

This comment has been minimized.

@ticosax

ticosax Oct 11, 2017

Contributor

You could do that also bool(num_sent) > 0.
reads better I think.

@ticosax

ticosax Oct 11, 2017

Contributor

You could do that also bool(num_sent) > 0.
reads better I think.

This comment has been minimized.

@blueyed

blueyed Oct 17, 2017

Contributor

Not motivated enough to change that now.

@blueyed

blueyed Oct 17, 2017

Contributor

Not motivated enough to change that now.

This comment has been minimized.

@ticosax

ticosax Oct 18, 2017

Contributor

fair enough

@ticosax

ticosax Oct 18, 2017

Contributor

fair enough

@blueyed

This comment has been minimized.

Show comment
Hide comment
@blueyed

blueyed Oct 17, 2017

Contributor

ready from my PIV: there could be a test, but not from me.

Contributor

blueyed commented Oct 17, 2017

ready from my PIV: there could be a test, but not from me.

@paltman paltman added this to the Samwise milestone Oct 20, 2017

@paltman paltman merged commit 8a476a0 into pinax:master Oct 25, 2017

16 checks passed

ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: py27dj110 Your tests passed on CircleCI!
Details
ci/circleci: py27dj111 Your tests passed on CircleCI!
Details
ci/circleci: py27dj18 Your tests passed on CircleCI!
Details
ci/circleci: py34dj110 Your tests passed on CircleCI!
Details
ci/circleci: py34dj111 Your tests passed on CircleCI!
Details
ci/circleci: py34dj18 Your tests passed on CircleCI!
Details
ci/circleci: py34dj20 Your tests passed on CircleCI!
Details
ci/circleci: py35dj110 Your tests passed on CircleCI!
Details
ci/circleci: py35dj111 Your tests passed on CircleCI!
Details
ci/circleci: py35dj18 Your tests passed on CircleCI!
Details
ci/circleci: py35dj20 Your tests passed on CircleCI!
Details
ci/circleci: py36dj111 Your tests passed on CircleCI!
Details
ci/circleci: py36dj20 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 99.39%)
Details
codecov/project 99.39% (+0%) compared to 6a1f3b8
Details

@blueyed blueyed deleted the blueyed:fix-send_receipt branch Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment