diff --git a/app/controllers/api/v1/projects_controller.rb b/app/controllers/api/v1/projects_controller.rb index 071f81932..01e891cca 100644 --- a/app/controllers/api/v1/projects_controller.rb +++ b/app/controllers/api/v1/projects_controller.rb @@ -63,7 +63,7 @@ class Api::V1::ProjectsController < Api::V1::BaseController end def fork - owner = (Group.find params[:group_id] if params[:group].present?) || current_user + owner = (Group.find params[:group_id] if params[:group_id].present?) || current_user authorize! :write, owner if owner.class == Group if forked = @project.fork(owner) and forked.valid? render_json_response forked, 'Project has been forked successfully'