import project API does not work when namespace is digits only

Summary

When using the api/v4/projects/import API with python requests lib with a namespace with digits only, I get a 404 error whereas the namespace actually exists. When changing the namespace to a non full digits namespace, it works. This means that the problem comes from the namespace name in full digits.

Steps to reproduce

all_users = requests.post(
    f"http://<gitlab>/api/v4/projects/import",
    headers={"PRIVATE-TOKEN": "<token>"},
    data={"path": "test", "namespace": "319"},
    files=files
)

==> {"message":"404 Namespace Not Found"}

What is the current bug behavior?

The project import is rejected

What is the expected correct behavior?

The project should be imported

Relevant logs and/or screenshots

==> {"message":"404 Namespace Not Found"}

Edited by 🤖 GitLab Bot 🤖