Fix group object access
This commit is contained in:
@ -94,7 +94,7 @@ def create_router(dependencies: AdminDependencies) -> APIRouter:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="No such group."
|
||||
)
|
||||
return results[0]
|
||||
return results.groups[0]
|
||||
|
||||
@app.post("/secrets/groups/")
|
||||
async def add_secret_group(
|
||||
@ -125,7 +125,7 @@ def create_router(dependencies: AdminDependencies) -> APIRouter:
|
||||
Entries within the group will be moved to the root.
|
||||
This also includes nested entries further down from the group.
|
||||
"""
|
||||
group = await admin.get_secret_group(group.name)
|
||||
group = await admin.get_secret_group(group_name)
|
||||
if not group:
|
||||
return
|
||||
await admin.delete_secret_group(group_name, keep_entries=True)
|
||||
@ -196,7 +196,7 @@ def create_router(dependencies: AdminDependencies) -> APIRouter:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="No such group."
|
||||
)
|
||||
group = groups[0]
|
||||
group = groups.groups[0]
|
||||
matching_entries = [
|
||||
entry for entry in group.entries if entry.name == secret_name
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user