Skip to content

Commit

Permalink
Merge pull request #46 from zfi/master
Browse files Browse the repository at this point in the history
Null email address causes Null Pointer exception
  • Loading branch information
zfi authored Mar 1, 2018
2 parents 5fe8a17 + 22a7668 commit 317558d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions app/Email/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def _convert_email_uri(email):
to create a URI that contains an email address that, when submitted to a
server, will not be replaced with a space character.
"""
if "+" in email:
return email.replace("+", "%2B")
else:
return email
if email is not None:
if "+" in email:
return email.replace("+", "%2B")

return email
5 changes: 4 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
app = Flask(__name__)

# Application version (major,minor,patch-level)
version = "1.1.4"
version = "1.1.5"

"""
Change Log
1.1.5 Refactor _convert_email_uri(email) to properly handle a null
email address.
1.1.4 Add code to convert plus signs located the the username portion
of an email address to a '%2B'when the email address is embedded
in a URL.
Expand Down

0 comments on commit 317558d

Please sign in to comment.