mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 11:53:49 +01:00
Use .get() instead of [] to access password_hash
This commit is contained in:
parent
fc8007dbec
commit
2e5a31f197
1 changed files with 1 additions and 1 deletions
|
@ -410,7 +410,7 @@ class CreateUserRestServlet(ClientV1RestServlet):
|
|||
raise SynapseError(400, "Failed to parse 'duration_seconds'")
|
||||
if duration_seconds > self.direct_user_creation_max_duration:
|
||||
duration_seconds = self.direct_user_creation_max_duration
|
||||
password_hash = user_json["password_hash"].encode("utf-8") if user_json["password_hash"] else None
|
||||
password_hash = user_json["password_hash"].encode("utf-8") if user_json.get("password_hash") else None
|
||||
|
||||
handler = self.handlers.registration_handler
|
||||
user_id, token = yield handler.get_or_create_user(
|
||||
|
|
Loading…
Reference in a new issue