Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
drf7 committed Mar 6, 2025
1 parent c9e4fe1 commit c5061ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nucliadb/src/nucliadb/ingest/service/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ async def ReIndex(self, request: IndexResource, context=None) -> IndexStatus: #
async def CreateBackup(
self, request: backups_pb2.CreateBackupRequest, context=None
) -> backups_pb2.CreateBackupResponse:
if not await exists_kb(request.kbid):
if not await exists_kb(request.kb_id):
return backups_pb2.CreateBackupResponse(
status=backups_pb2.CreateBackupResponse.Status.KB_NOT_FOUND
)
await backup_tasks.create(request.kbid, request.backup_id)
await backup_tasks.create(request.kb_id, request.backup_id)
return backups_pb2.CreateBackupResponse(status=backups_pb2.CreateBackupResponse.Status.OK)

async def DeleteBackup(
Expand All @@ -493,15 +493,15 @@ async def DeleteBackup(
async def RestoreBackup(
self, request: backups_pb2.RestoreBackupRequest, context=None
) -> backups_pb2.RestoreBackupResponse:
if not await exists_kb(request.kbid):
if not await exists_kb(request.kb_id):
return backups_pb2.RestoreBackupResponse(
status=backups_pb2.RestoreBackupResponse.Status.NOT_FOUND
)
if not await backup_utils.exists_backup(self.storage, request.backup_id):
return backups_pb2.RestoreBackupResponse(
status=backups_pb2.RestoreBackupResponse.Status.NOT_FOUND
)
await backup_tasks.restore(request.kbid, request.backup_id)
await backup_tasks.restore(request.kb_id, request.backup_id)
return backups_pb2.RestoreBackupResponse(status=backups_pb2.RestoreBackupResponse.Status.OK)


Expand Down

0 comments on commit c5061ae

Please sign in to comment.