When a policy is created and viewed the policy using the policy view icon the page keeps loading sometimes due to an undefined deviceGroups variable inside the policyPayloadObj. The purpose of this PR is to fix this issue.
Resolves wso2/product-iots#1681
Goals
Fixing the above issue
Approach
This commit fixes this issue by improving the code where the null check has been made to check if the deviceGroup is null. Also made few improvements in the code where the checks have been made.
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning