password fix

master
Mustafa Yontar 4 years ago
parent a864c83adb
commit 8da4aed715
  1. 2
      models/User.py

@ -125,6 +125,8 @@ class User(Document):
def save(self, *args, **kwargs):
if self.union:
self.member_no = User.objects.filter(union=self.union).count()
if self.password.find('pbkdf2:') == -1:
self.password = generate_password_hash(self.password)

Loading…
Cancel
Save