💄 Cosmetic changes

parent 72009896
...@@ -89,7 +89,8 @@ class TaskService ...@@ -89,7 +89,8 @@ class TaskService
# #
def new_note(note) def new_note(note)
# Skip system notes, like status changes and cross-references # Skip system notes, like status changes and cross-references
unless note.system return if note.system
project = note.project project = note.project
target = note.noteable target = note.noteable
author = note.author author = note.author
...@@ -102,7 +103,6 @@ class TaskService ...@@ -102,7 +103,6 @@ class TaskService
create_task(project, target, author, user, Task::MENTIONED, note) create_task(project, target, author, user, Task::MENTIONED, note)
end end
end end
end
# When update a note we should: # When update a note we should:
# #
...@@ -111,7 +111,8 @@ class TaskService ...@@ -111,7 +111,8 @@ class TaskService
# #
def update_note(note, current_user) def update_note(note, current_user)
# Skip system notes, like status changes and cross-references # Skip system notes, like status changes and cross-references
unless note.system return if note.system
project = note.project project = note.project
target = note.noteable target = note.noteable
author = current_user author = current_user
...@@ -126,7 +127,6 @@ class TaskService ...@@ -126,7 +127,6 @@ class TaskService
end end
end end
end end
end
private private
...@@ -159,10 +159,10 @@ class TaskService ...@@ -159,10 +159,10 @@ class TaskService
end end
def pending_tasks(user, project, target, options = {}) def pending_tasks(user, project, target, options = {})
options.reverse_merge({ options.reverse_merge(
project: project, project: project,
target: target target: target
}) )
user.tasks.pending.where(options) user.tasks.pending.where(options)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment