[#125] fix error with fork project to the group
This commit is contained in:
parent
81c63e68ee
commit
a2e92d6e94
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue