Skip to content

Commit

Permalink
[api] fix crash in package instantiate command
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Aug 31, 2016
1 parent 5c71a19 commit 7805fae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/app/controllers/source_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,9 @@ def package_command_collectbuildenv
def package_command_instantiate
project = Project.get_by_name(params[:project])
opackage = Package.get_by_project_and_name(project.name, params[:package], {check_update_project: true})

unless opackage
raise RemoteProjectError.new "Instantiation from remote project is not supported"
end
if project == opackage.project
raise CmdExecutionNoPermission.new "package is already intialized here"
end
Expand Down

0 comments on commit 7805fae

Please sign in to comment.