Skip to content

Commit

Permalink
Py-2.7 fix pr_Template (lxml error if username contains non-ASCII chars)
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Dec 3, 2019
1 parent 7fd2473 commit 6c53141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nursix-dev-3370-g71aab6d (2019-12-02 20:03:23)
nursix-dev-3371-g7fd2473 (2019-12-03 13:54:10)
9 changes: 5 additions & 4 deletions modules/s3db/pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -8477,11 +8477,12 @@ def apply_method(self, r, **attr):
if selector == "current_user.name":
user = current.auth.user
if user:
doc_data[key] = s3_format_fullname(fname=user.first_name,
lname=user.last_name,
)
username = s3_format_fullname(fname = user.first_name,
lname = user.last_name,
)
else:
doc_data[key] = current.T("Unknown User")
username = current.T("Unknown User")
doc_data[key] = s3_unicode(username)
else:
rfield = rfields.get(prefix(selector))
if rfield:
Expand Down

0 comments on commit 6c53141

Please sign in to comment.