Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: NPE while creating a policies copy (appsmithorg#36172)
## Description PR to handle the empty collection and null values for policies. We expect web should never end up in this state but we have received enough evidences that because of broken functionality in GAC we may end up in this scenario. One such example is appsmithorg#36063 /test all ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10767073729> > Commit: e225d54 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10767073729&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/Debugger/Widget_property_navigation_spec.ts > <li>cypress/e2e/Regression/ClientSide/OneClickBinding/PropertyControl_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Mon, 09 Sep 2024 07:01:41 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of user permissions to prevent potential errors related to null values in policies. - Enhanced robustness in policy management methods to avoid null-related errors when retrieving existing policies. - **Tests** - Added unit tests for user permissions handling and policy management to ensure robust behavior under various conditions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information