diff --git a/arangoasync/database.py b/arangoasync/database.py index 5e8fecc..90adaa0 100644 --- a/arangoasync/database.py +++ b/arangoasync/database.py @@ -212,7 +212,7 @@ async def create_database( if users is not None: data["users"] = [ { - "username": user["username"], + "username": user["user"] if "user" in user else user["username"], "passwd": user["password"], "active": user.get("active", True), "extra": user.get("extra", {}), diff --git a/arangoasync/typings.py b/arangoasync/typings.py index 653c2de..7ba0f1e 100644 --- a/arangoasync/typings.py +++ b/arangoasync/typings.py @@ -333,9 +333,7 @@ def __init__( active: bool = True, extra: Optional[Json] = None, ) -> None: - # There is a small inconsistency between _api/user and _api/database. - # The former uses "user" and the latter uses "username" for the username. - data = {"user": user, "username": user, "active": active} + data = {"user": user, "active": active} if password is not None: data["password"] = password if extra is not None: