Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
22e9202c
Commit
22e9202c
authored
Oct 10, 2019
by
Victor Zagorodny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra :project param from finder helper
parent
40e7e5a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ee/lib/api/helpers/vulnerability_findings_helpers.rb
ee/lib/api/helpers/vulnerability_findings_helpers.rb
+3
-3
No files found.
ee/lib/api/helpers/vulnerability_findings_helpers.rb
View file @
22e9202c
...
@@ -32,9 +32,9 @@ module API
...
@@ -32,9 +32,9 @@ module API
# TODO: rename to vulnerability_findings_by https://gitlab.com/gitlab-org/gitlab/issues/32963
# TODO: rename to vulnerability_findings_by https://gitlab.com/gitlab-org/gitlab/issues/32963
def
vulnerability_occurrences_by
(
params
)
def
vulnerability_occurrences_by
(
params
)
pipeline
=
if
params
[
:pipeline_id
]
pipeline
=
if
params
[
:pipeline_id
]
params
[
:project
]
.
all_pipelines
.
find_by
(
id:
params
[
:pipeline_id
])
# rubocop:disable CodeReuse/ActiveRecord
user_project
.
all_pipelines
.
find_by
(
id:
params
[
:pipeline_id
])
# rubocop:disable CodeReuse/ActiveRecord
else
else
params
[
:project
]
.
latest_pipeline_with_security_reports
user_project
.
latest_pipeline_with_security_reports
end
end
return
[]
unless
pipeline
return
[]
unless
pipeline
...
@@ -47,7 +47,7 @@ module API
...
@@ -47,7 +47,7 @@ module API
vulnerability_occurrences
=
paginate
(
vulnerability_occurrences
=
paginate
(
Kaminari
.
paginate_array
(
Kaminari
.
paginate_array
(
vulnerability_occurrences_by
(
declared_params
.
merge
(
project:
user_project
)
)
vulnerability_occurrences_by
(
declared_params
)
)
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment