summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index c2fb36b4143..e8a0e7f3ec9 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -247,7 +247,7 @@ module API
# DELETE /projects/:id/fork
delete ":id/fork" do
authenticated_as_admin!
- unless user_project.forked_project_link.nil?
+ if user_project.forked?
user_project.forked_project_link.destroy
end
end