Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 2
    • Merge requests 2
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !28612

Fix invalid visibility string comparison in project import

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Stan Hu requested to merge sh-project-import-visibility-error into master May 22, 2019
  • Overview 6
  • Commits 1
  • Pipelines 2
  • Changes 3

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 May 22, 2019 by Stan Hu
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: sh-project-import-visibility-error