From 7c425c00aa175e0ee7436e2a37ff4aedf6971dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 12 Jul 2020 22:24:09 +0200 Subject: [PATCH] Remove unnecessary condition The ballot is used in the previous lines, so there's no point checking whether it's present. --- app/models/budget/investment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index fc4d31ff7..b11af9e25 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -268,7 +268,7 @@ class Budget return :not_selected unless selected? return :no_ballots_allowed unless budget.balloting? return :different_heading_assigned unless ballot.valid_heading?(heading) - return :not_enough_money if ballot.present? && !enough_money?(ballot) + return :not_enough_money unless enough_money?(ballot) return :casted_offline if ballot.casted_offline? end