From afffef2acedc43e9d2fd00d6bf55f491f5884560 Mon Sep 17 00:00:00 2001 From: xusongfu Date: Mon, 30 Aug 2021 14:07:38 +0800 Subject: [PATCH] fix: Show the image which has no usage_type Show the image which has no usage_type in the image list when create instace or ironic Change-Id: I3d9cc0578eddb10942e039e507c63bf3ec6662c5 --- src/resources/image.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/image.jsx b/src/resources/image.jsx index 9473fc90..a4a14e75 100644 --- a/src/resources/image.jsx +++ b/src/resources/image.jsx @@ -131,10 +131,10 @@ export const isSnapshot = (item) => { }; export const canImageCreateInstance = (item) => - item.status === 'active' && item.usage_type === 'common'; + item.status === 'active' && (item.usage_type === 'common' || item.usage_type === undefined); export const canImageCreateIronicInstance = (item) => - item.status === 'active' && item.usage_type === 'ironic'; + item.status === 'active' && (item.usage_type === 'ironic' || item.usage_type === undefined); export const canSnapshotCreateInstance = (item) => item.status === 'active';