mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Fix RuboCop offense Lint/SafeNavigationConsistency (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@23134 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a04ca392dd
commit
09451a1df0
@ -2071,7 +2071,7 @@ class Issue < ApplicationRecord
|
||||
|
||||
def add_auto_watcher
|
||||
if author&.active? &&
|
||||
author&.allowed_to?(:add_issue_watchers, project) &&
|
||||
author.allowed_to?(:add_issue_watchers, project) &&
|
||||
author.pref.auto_watch_on?('issue_created') &&
|
||||
self.watcher_user_ids.exclude?(author.id)
|
||||
self.set_watcher(author, true)
|
||||
|
||||
@ -339,7 +339,7 @@ class Journal < ApplicationRecord
|
||||
|
||||
def add_watcher
|
||||
if user&.active? &&
|
||||
user&.allowed_to?(:add_issue_watchers, project) &&
|
||||
user.allowed_to?(:add_issue_watchers, project) &&
|
||||
user.pref.auto_watch_on?('issue_contributed_to') &&
|
||||
!Watcher.any_watched?(Array.wrap(journalized), user)
|
||||
journalized.set_watcher(user, true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user