From 24a965e798d6ad1d53596899323c73971ad6fc78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 30 May 2023 12:23:23 +0200 Subject: [PATCH] Style/NegatedIf: Favor unless over if for negative conditions. --- app/models/dmsf_file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 273a1c8e..723a3554 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -366,7 +366,7 @@ class DmsfFile < ApplicationRecord results = scope.where(find_options).uniq.to_a results.delete_if { |x| !DmsfFolder.permissions?(x.dmsf_folder) } - if !options[:titles_only] + unless options[:titles_only] database = nil begin lang = Setting.plugin_redmine_dmsf['dmsf_stemming_lang'].strip