← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-isNameBlacklisted into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-isNameBlacklisted into launchpad:master.

Commit message:
Stop encoding name in PersonSet.isNameBlacklisted

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/396700

Similar to 3cb9c29557edd7b1ff10bc2ec306532d8fb8d5c2: this used to be necessary with very old versions of psycopg2, but is no longer.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-isNameBlacklisted into launchpad:master.
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index eb532ba..9d2bf43 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -3247,7 +3247,7 @@ class PersonSet:
         cur = cursor()
         cur.execute(
             "SELECT is_blacklisted_name(%(name)s, %(user_id)s)" % sqlvalues(
-            name=name.encode('UTF-8'), user_id=user_id))
+                name=name, user_id=user_id))
         return bool(cur.fetchone()[0])
 
     def getTopContributors(self, limit=50):