From b5eb669efa86ff6a174162af9ec30a5d852f7b19 Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Wed, 7 Sep 2022 17:44:14 +0800 Subject: [PATCH] fix: fix the project id info for volume backups Use the os-backup-project-attr:project_id as the project id for volume backup data Closes-Bug: #1988964 Change-Id: Ic6d43c5b6fe6a68fcc8963740c97179ed74e2c5f --- src/stores/cinder/backup.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/stores/cinder/backup.js b/src/stores/cinder/backup.js index 7818a2a6..24da623b 100644 --- a/src/stores/cinder/backup.js +++ b/src/stores/cinder/backup.js @@ -29,6 +29,13 @@ export class BackupStore extends Base { return true; } + get mapperBeforeFetchProject() { + return (data) => ({ + ...data, + project_id: data.project_id || data['os-backup-project-attr:project_id'], + }); + } + updateParamsSortPage = (params, sortKey, sortOrder) => { if (sortKey && sortOrder) { params.sort = `${sortKey}:${sortOrder === 'descend' ? 'desc' : 'asc'}`;