Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(THEEDGE-3757): add validation to imageset #2122

Merged

Conversation

acosferreira
Copy link
Contributor

Fix validation to avoid exception for navigate.
Check if deviceImageSet is filled before find the imae value
THEEDGE-3757

@acosferreira acosferreira requested a review from a team as a code owner December 12, 2023 18:52
@acosferreira
Copy link
Contributor Author

/retest

1 similar comment
@acosferreira
Copy link
Contributor Author

/retest

…-frontend into THEEDGE-3757-fix-scalprum-error
@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fb656c6) 57.59% compared to head (bbe88aa) 57.47%.

Files Patch % Lines
...c/components/GroupSystems/GroupImmutableSystems.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2122      +/-   ##
==========================================
- Coverage   57.59%   57.47%   -0.13%     
==========================================
  Files         193      193              
  Lines        6198     6198              
  Branches     1717     1717              
==========================================
- Hits         3570     3562       -8     
- Misses       2628     2636       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adonispuente
Copy link
Contributor

/retest

@@ -187,7 +187,7 @@ const GroupImmutableSystems = ({ groupName, groupId, ...props }) => {

//enable disable bulk update based on selection, must refactor
useEffect(() => {
if (selected.size > 0) {
if (selected.size > 0 && deviceImageSet?.size > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't deviceImageSet be added as a dependency to the useEffect's dependency array ? 🤔
The condition could change when it is changed, which would effect the Effect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LiorKGOW included the validation on useEffect but I kept the condition cause we should not get in this validation if there is no imageSet

@gkarat gkarat added the bug Something isn't working label Dec 14, 2023
@gkarat gkarat requested review from a team and LiorKGOW December 15, 2023 10:54
LiorKGOW
LiorKGOW previously approved these changes Dec 15, 2023
Copy link
Member

@LiorKGOW LiorKGOW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I can't reproduce the bug that was mentioned on the ticket
Could someone have a look ?
@RedHatInsights/team-interact

Copy link
Member

@LiorKGOW LiorKGOW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by mistake

@LiorKGOW LiorKGOW dismissed their stale review December 15, 2023 20:34

Approved by mistake

Copy link
Member

@LiorKGOW LiorKGOW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine to me
Thank you @acosferreira

@LiorKGOW LiorKGOW merged commit 24c787d into RedHatInsights:master Dec 15, 2023
2 checks passed
@gkarat
Copy link
Contributor

gkarat commented Dec 15, 2023

🎉 This PR is included in version 1.62.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants