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
2b5ac0a8
Commit
2b5ac0a8
authored
Jul 13, 2021
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed association between Finding, Finding Links
Changelog: fixed EE: true
parent
6d377105
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ee/app/models/vulnerabilities/finding_link.rb
ee/app/models/vulnerabilities/finding_link.rb
+1
-1
ee/spec/models/vulnerabilities/finding_link_spec.rb
ee/spec/models/vulnerabilities/finding_link_spec.rb
+1
-1
No files found.
ee/app/models/vulnerabilities/finding_link.rb
View file @
2b5ac0a8
...
...
@@ -4,7 +4,7 @@ module Vulnerabilities
class
FindingLink
<
ApplicationRecord
self
.
table_name
=
'vulnerability_finding_links'
belongs_to
:finding
,
class_name:
'Vulnerabilities::Finding'
,
inverse_of: :finding_
identifier
s
,
foreign_key:
'vulnerability_occurrence_id'
belongs_to
:finding
,
class_name:
'Vulnerabilities::Finding'
,
inverse_of: :finding_
link
s
,
foreign_key:
'vulnerability_occurrence_id'
validates
:finding
,
presence:
true
validates
:url
,
presence:
true
,
length:
{
maximum:
255
}
...
...
ee/spec/models/vulnerabilities/finding_link_spec.rb
View file @
2b5ac0a8
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec
.
describe
Vulnerabilities
::
FindingLink
do
describe
'associations'
do
it
{
is_expected
.
to
belong_to
(
:finding
).
class_name
(
'Vulnerabilities::Finding'
)
}
it
{
is_expected
.
to
belong_to
(
:finding
).
class_name
(
'Vulnerabilities::Finding'
)
.
inverse_of
(
:finding_link
)
}
end
describe
'validations'
do
...
...
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