def patch_attributes(self, attributes): if 'password' in attributes: attributes['password_hash'] = postgres_context.encrypt( force_text(attributes['password']), user=self.name, ) return attributes
def patch_attributes(self, attributes): if 'password' in attributes: attributes['password_hash'] = postgres_context.encrypt( attributes['password'], user=self.name, ) return attributes
def hashed_password(raw_value): return postgres_context.encrypt(raw_value, user='******')