From 59daaa27e9d207569428c5f593c9f0a4dd62abf6 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 30 Mar 2025 08:31:05 +0000 Subject: [PATCH] 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 --- app/models/time_entry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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