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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
f739a4e8
Commit
f739a4e8
authored
8 years ago
by
Grzegorz Bizon
Committed by
Robert Speicher
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reduntant note validation from create service
parent
1bcb1ef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
11 deletions
+0
-11
app/services/notes/create_service.rb
app/services/notes/create_service.rb
+0
-11
No files found.
app/services/notes/create_service.rb
View file @
f739a4e8
...
@@ -5,8 +5,6 @@ module Notes
...
@@ -5,8 +5,6 @@ module Notes
note
.
author
=
current_user
note
.
author
=
current_user
note
.
system
=
false
note
.
system
=
false
return
unless
valid_project?
(
note
)
if
note
.
save
if
note
.
save
# Finish the harder work in the background
# Finish the harder work in the background
NewNoteWorker
.
perform_in
(
2
.
seconds
,
note
.
id
,
params
)
NewNoteWorker
.
perform_in
(
2
.
seconds
,
note
.
id
,
params
)
...
@@ -15,14 +13,5 @@ module Notes
...
@@ -15,14 +13,5 @@ module Notes
note
note
end
end
private
def
valid_project?
(
note
)
return
false
unless
project
return
true
if
note
.
for_commit?
note
.
noteable
.
try
(
:project
)
==
project
end
end
end
end
end
This diff is collapsed.
Click to expand it.
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