diff options
author | 🙈 jacopo beschi 🙉 <intrip@gmail.com> | 2018-09-12 20:52:30 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-09-12 20:52:30 +0000 |
commit | 8e52f56d8d1a041716d4ebcf8a42934825a921af (patch) | |
tree | 467b5f55fe9b757959c1e5bd4c281beff163ac14 /app/finders | |
parent | fb81210ba7079ede4451d979b8da92fcdf04a17c (diff) | |
download | gitlab-ce-8e52f56d8d1a041716d4ebcf8a42934825a921af.tar.gz |
Resolve "500 Internal Server Error: Deleting branch of deleted project"
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/projects_finder.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb index cac6643eff3..0398ccce93b 100644 --- a/app/finders/projects_finder.rb +++ b/app/finders/projects_finder.rb @@ -49,6 +49,7 @@ class ProjectsFinder < UnionFinder collection = by_search(collection) collection = by_archived(collection) collection = by_custom_attributes(collection) + collection = by_deleted_status(collection) sort(collection) end @@ -131,6 +132,10 @@ class ProjectsFinder < UnionFinder params[:search].present? ? items.search(params[:search]) : items end + def by_deleted_status(items) + params[:without_deleted].present? ? items.without_deleted : items + end + def sort(items) params[:sort].present? ? items.sort_by_attribute(params[:sort]) : items.order_id_desc end |