summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2025-03-30 08:31:05 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2025-03-30 08:31:05 +0000
commit59daaa27e9d207569428c5f593c9f0a4dd62abf6 (patch)
tree94ff0bdd16d02ccebeec05eb897026dd392a8afc
parent7ecfac8020b3e4786c8f7cca261e53ae2fd482d3 (diff)
downloadredmine-59daaa27e9d207569428c5f593c9f0a4dd62abf6.tar.gz
redmine-59daaa27e9d207569428c5f593c9f0a4dd62abf6.zip
Fixes rubocop offense "[Correctable] Lint/SafeNavigationConsistency: Use . instead of unnecessary &.." (#13596).
git-svn-id: https://svn.redmine.org/redmine/trunk@23588 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/time_entry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index b97d47b5d..4a3a79987 100644
--- a/app/models/time_entry.rb
+++ b/app/models/time_entry.rb
@@ -182,7 +182,7 @@ class TimeEntry < ApplicationRecord
if spent_on && spent_on_changed? && user
errors.add :base, I18n.t(:error_spent_on_future_date) if !Setting.timelog_accept_future_dates? && (spent_on > user.today)
end
- if !Setting.timelog_accept_closed_issues? && issue&.closed? && issue&.was_closed?
+ if !Setting.timelog_accept_closed_issues? && issue&.closed? && issue.was_closed?
errors.add :base, I18n.t(:error_spent_on_closed_issue)
end
end