Skip to content

Commit

Permalink
CASMCMS-8962: Properly handle response from DB.get_all
Browse files Browse the repository at this point in the history
(cherry picked from commit caa5a76)
  • Loading branch information
mharding-hpe committed Apr 5, 2024
1 parent aa3f589 commit eeeb195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fix bug in `patch_v2_components_dict` to properly handle response from `DB.get_all()`

## [1.19.2] - 04/04/2024
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions src/server/cray/cfs/api/controllers/components.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2020-2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2020-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -302,7 +302,7 @@ def patch_v2_components_dict(data):
else:
# On large scale systems, this response may be too large
# use v3 for smaller responses
components = DB.get_all()
components = [ (component_data["id"], component_data) for component_data in DB.get_all()[0] ]

response = []
patch = data.get("patch", {})
Expand Down

0 comments on commit eeeb195

Please sign in to comment.