diff options
author | Rémy Coutable <remy@rymai.me> | 2018-07-16 18:29:14 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-16 18:29:14 +0000 |
commit | 7f0431dd8550ac9d229d1383c03386c1634d015f (patch) | |
tree | ed4e1e1ed3964d180d51460f14aa35a53834c8c8 /app/finders | |
parent | c82adcce6b21272d3d9c8cee541ed03e60e65439 (diff) | |
parent | 209fd86442930ffd398849e386d9d13e699799c7 (diff) | |
download | gitlab-ce-7f0431dd8550ac9d229d1383c03386c1634d015f.tar.gz |
Merge branch 'fix-project-api-archived' into 'master'
Fix archived parameter for projects API
Closes #32301
See merge request gitlab-org/gitlab-ce!20566
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/projects_finder.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb index c7d6bc6cfdc..b06595081e7 100644 --- a/app/finders/projects_finder.rb +++ b/app/finders/projects_finder.rb @@ -16,6 +16,7 @@ # personal: boolean # search: string # non_archived: boolean +# archived: 'only' or boolean # class ProjectsFinder < UnionFinder include CustomAttributesFilter @@ -130,7 +131,7 @@ class ProjectsFinder < UnionFinder def by_archived(projects) if params[:non_archived] projects.non_archived - elsif params.key?(:archived) # Back-compatibility with the places where `params[:archived]` can be set explicitly to `false` + elsif params.key?(:archived) if params[:archived] == 'only' projects.archived elsif Gitlab::Utils.to_boolean(params[:archived]) |