Skip to content

Fix invalid visibility string comparison in project import

Stan Hu requested to merge sh-project-import-visibility-error into master

This resolves an ArgumentError: comparison of String with 0 failed error where the visibility_level is stored as a string in the project import data because the value comes directly from the Web form. This problem happened upon creating a project from a template or restoring a project.

We now cast the value to an integer to guard against these kinds of failures.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61692

Edited by Stan Hu

Merge request reports