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
57484801
Commit
57484801
authored
Oct 01, 2021
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark Vulnerabilities::Flag#created_at as read-only
parent
0068c3a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
ee/app/models/vulnerabilities/flag.rb
ee/app/models/vulnerabilities/flag.rb
+4
-0
No files found.
ee/app/models/vulnerabilities/flag.rb
View file @
57484801
...
...
@@ -4,6 +4,10 @@ module Vulnerabilities
class
Flag
<
ApplicationRecord
self
.
table_name
=
'vulnerability_flags'
# This is necessary to prevent updating the
# created_at attribute with upsert queries.
attr_readonly
(
:created_at
)
belongs_to
:finding
,
class_name:
'Vulnerabilities::Finding'
,
foreign_key:
'vulnerability_occurrence_id'
,
inverse_of: :vulnerability_flags
,
optional:
false
validates
:origin
,
length:
{
maximum:
255
}
...
...
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