Skip to content

Commit

Permalink
fix: Add conditional to avoid update options to be update when no upd…
Browse files Browse the repository at this point in the history
…ate is available on group

Signed-off-by: Adelia Ferreira <[email protected]>
  • Loading branch information
adeliaferreira committed Feb 1, 2024
1 parent f2f6953 commit c5eb4d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/GroupSystems/GroupImmutableSystems.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ const GroupImmutableSystems = ({ groupName, groupId, ...props }) => {
enhancedConfig,
showTags
);

const mapDeviceIds = mapDefaultData(defaultData.results);
const updateInfo = await getUpdateInfo(groupId);
setDeviceData(updateInfo?.update_devices_uuids);
Expand Down Expand Up @@ -206,6 +205,7 @@ const GroupImmutableSystems = ({ groupName, groupId, ...props }) => {
setCanUpdate(false);
}
}, [deviceData, selected, deviceImageSet]);

return (
<div id="group-systems-table">
{addToGroupModalOpen && (
Expand Down Expand Up @@ -275,7 +275,7 @@ const GroupImmutableSystems = ({ groupName, groupId, ...props }) => {
title: (
<ActionDropdownItem
isAriaDisabled={
deviceData && !deviceData.find((obj) => obj === row.id)
deviceData ? !deviceData.includes(row.id) : true
}
requiredPermissions={REQUIRED_PERMISSIONS_TO_MODIFY_GROUP(
groupId
Expand Down

0 comments on commit c5eb4d9

Please sign in to comment.