style(rubocop): Lint/UselessAssignment

This commit is contained in:
Adam Cooke
2024-02-10 17:18:24 +00:00
parent 25d7d66b47
commit 7590a46234
12 changed files with 18 additions and 20 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ class Route < ApplicationRecord
if route = Route.includes(:domain).where(domains: { name: domain.name }, name: name).where.not(id: id).first
errors.add :name, "is configured on the #{route.server.full_permalink} mail server"
end
elsif route = Route.where(name: "__returnpath__").where.not(id: id).exists?
elsif Route.where(name: "__returnpath__").where.not(id: id).exists?
errors.add :base, "A return path route already exists for this server"
end
end