Use assignment expressions 05 (#57785)
This commit is contained in:
parent
d09ee11c54
commit
5048bad050
19 changed files with 36 additions and 71 deletions
|
@ -103,8 +103,7 @@ async def websocket_delete(hass, connection, msg):
|
|||
@websocket_api.async_response
|
||||
async def websocket_change_password(hass, connection, msg):
|
||||
"""Change current user password."""
|
||||
user = connection.user
|
||||
if user is None:
|
||||
if (user := connection.user) is None:
|
||||
connection.send_error(msg["id"], "user_not_found", "User not found")
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue