Skip to content

Commit

Permalink
Manually merge PR rpicard#112: missing a ":"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ming committed Feb 26, 2020
1 parent fda44ca commit f6f8cd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ before being stored.
return self._password

@password.setter
def _set_password(self, plaintext):
self._password = bcrypt.generate_password_hash(plaintext)
def password(self, plaintext):
self._password = bcrypt.generate_password_hash(plaintext).decode("utf-8")

We're using SQLAlchemy's hybrid extension to define a property with
several different functions called from the same interface. Our setter
Expand Down Expand Up @@ -337,7 +337,7 @@ the hashed password stored for that user.

# [...] columns and properties

def is_correct_password(self, plaintext)
def is_correct_password(self, plaintext):
return bcrypt.check_password_hash(self._password, plaintext)


Expand Down

0 comments on commit f6f8cd1

Please sign in to comment.