-
Notifications
You must be signed in to change notification settings - Fork 75
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: Error when deleting the last sub-resource from a resource in policy editor #13620
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13620 +/- ##
=======================================
Coverage 95.22% 95.22%
=======================================
Files 1499 1499
Lines 20499 20505 +6
Branches 2485 2485
=======================================
+ Hits 19520 19526 +6
Misses 869 869
Partials 110 110 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 😄
Should we maybe add some tests as well to see that it works as expected?
@wrt95 In order to test this properly, I had to add a few mocks. What do you think about this change? 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ok👍
Description
Removed the delete button when there is only one sub-resource. The user can instead change the existing fields.
Discussed this with @Annikenkbrathen and concluded that this is an OK fix until we replace this functionality with "tilgangspakker".
Related Issue(s)
Before
2.mov
After
Spiller.inn.2024-09-24.132133.mp4
Verification