summaryrefslogtreecommitdiffstats
path: root/api/resources/v2/images.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/resources/v2/images.py')
-rw-r--r--api/resources/v2/images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/resources/v2/images.py b/api/resources/v2/images.py
index 8755e5265..8359e105b 100644
--- a/api/resources/v2/images.py
+++ b/api/resources/v2/images.py
@@ -37,6 +37,8 @@ class V2Images(ApiResource):
else:
images = [self.get_info(change_obj_to_dict(i)) for i in images_list]
status = 1 if all(i['status'] == 'ACTIVE' for i in images) else 0
+ if not images:
+ status = 0
return result_handler(consts.API_SUCCESS, {'status': status, 'images': images})