undefined method `unique_project_download_limit_enabled?' for nil:NilClass (NoMethodError)

Summary

Requests to /api/v4/groups fail with:

NoMethodError

undefined method `unique_project_download_limit_enabled?' for nil:NilClass (NoMethodError)

        next unless root_namespace.unique_project_download_limit_enabled?
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Steps to reproduce

Send a request to the endpoint

Example Project

/

What is the current bug behavior?

Error is returned

What is the expected correct behavior?

The endpoint does not return a 500

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com - GitLab Enterprise Edition 17.5.0-pre c817d4fdb97

Possible fixes

Edited by Alex Pooley