This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Clean up JSON endpoint for homepage form #4617
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Sep 10, 2017
chadwhitacre
changed the title
Clean up the homepage API
Clean up JSON endpoint for homepage form
Sep 10, 2017
chadwhitacre
commented
Sep 10, 2017
gratipay/homepage.py
Outdated
return {'parsed': parsed, 'errors': errors} | ||
if parsed['email_address'] and not errors: | ||
_send(app, parsed['email_address'], pfos) | ||
return {'errors': errors, 'receipt_url': pfos.receipt_url} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's an early parse error then pfos
is a null pointer here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chadwhitacre
commented
Sep 10, 2017
gratipay/homepage.py
Outdated
parsed = {} # no need to populate form anymore | ||
return {'parsed': parsed, 'errors': errors} | ||
if parsed['email_address'] and not errors: | ||
_send(app, parsed['email_address'], pfos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make pfos
the second arg to match _charge
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chadwhitacre
force-pushed
the
new-homepage-wireup
branch
from
September 10, 2017 09:13
403e7cb
to
1f10b7b
Compare
chadwhitacre
force-pushed
the
new-homepage-api-cleanups
branch
from
September 10, 2017 09:14
5091fa3
to
2a3832c
Compare
Closed
chadwhitacre
force-pushed
the
new-homepage-wireup
branch
from
September 10, 2017 09:43
1f10b7b
to
02b842c
Compare
Rebased, squashed, tests fixed (hopefully Travis agrees). Was 81711a8. |
chadwhitacre
force-pushed
the
new-homepage-api-cleanups
branch
from
September 10, 2017 09:58
81711a8
to
c79a871
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
← #4604 — #4613 →
receipt_url
andpfos
not existing_send
call sig w/_charge
change base tonew-homepage