Skip to content

Commit

Permalink
Make delete parameter to behave properly
Browse files Browse the repository at this point in the history
This way `?delete=0` and `?` behaves consistently, and only `?delete=1`
activates the behaviour for deleted projects

Fixes openSUSE#16911
  • Loading branch information
danidoni committed Oct 2, 2024
1 parent cde1918 commit 322e642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/controllers/source_project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class SourceProjectController < SourceController
# GET /source/:project
def show
project_name = params[:project]
if params.key?(:deleted)
if params[:deleted] == '1'
unless Project.find_by_name(project_name) || Project.is_remote_project?(project_name)
# project is deleted or not accessible
validate_visibility_of_deleted_project(project_name)
Expand Down

0 comments on commit 322e642

Please sign in to comment.