Return default of zero for group descendants count
What does this MR do and why?
Return default of zero for group descendants count
While the group is being deleted we run the GraphQL query to get its descendants, the current query will return no row for this group ID. This was causing an error in the group.descendant_groups_count GraphQL query. This issue came to light in #455871.
We have fixed this issue here by setting a default of 0 for the hash returned by the Group#descendant_groups_counts method.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Checkout this MR !148701 (merged).
- Go to https://gdk.test:3000/-/organizations/default/groups_and_projects and delete a subgroup. It will to go the
Pending deletion
state. - Delete the subgroup again and it will show an error.
- Apply the changes from the current MR to the above MR.
- Repeat steps 2 to 3 and there should be no error.
- See this Groups (Bug) video for detailed instructions.
Related to #455871