File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ async def create_database(
212212 if users is not None :
213213 data ["users" ] = [
214214 {
215- "username" : user ["username" ],
215+ "username" : user ["user" ] if "user" in user else user [ " username" ],
216216 "passwd" : user ["password" ],
217217 "active" : user .get ("active" , True ),
218218 "extra" : user .get ("extra" , {}),
Original file line number Diff line number Diff line change @@ -333,9 +333,7 @@ def __init__(
333333 active : bool = True ,
334334 extra : Optional [Json ] = None ,
335335 ) -> None :
336- # There is a small inconsistency between _api/user and _api/database.
337- # The former uses "user" and the latter uses "username" for the username.
338- data = {"user" : user , "username" : user , "active" : active }
336+ data = {"user" : user , "active" : active }
339337 if password is not None :
340338 data ["password" ] = password
341339 if extra is not None :
You can’t perform that action at this time.
0 commit comments