Fix cache of branch_requires_code_owner_approval?
What does this MR do and why?
When using ||=, if the right side of the equation is nil or false,
then it's not cached properly.
Introduced in Reduce N+1 queries from Projects::MergeRequests... (!56775 - merged).
References
- Resolve N+1 on merge request variables in runne... (#515980 - closed)
- https://gitlab.com/gitlab-org/gitlab/-/issues/515959+
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.
Edited by Furkan Ayhan