[#125] fix error with fork project to the group

This commit is contained in:
Alexander Machehin 2013-05-08 00:08:07 +06:00
parent 81c63e68ee
commit a2e92d6e94
1 changed files with 1 additions and 1 deletions

View File

@ -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'