Skip to content

Fixing username inconsistency #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arangoasync/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", {}),
Expand Down
4 changes: 1 addition & 3 deletions arangoasync/typings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading