From c7d768fbed2ed01c54ecf59f2004835cbfb9b71f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Tue, 8 Sep 2020 11:14:26 +0300 Subject: [PATCH] Fix autobindable? condition --- app/models/bank_transaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bank_transaction.rb b/app/models/bank_transaction.rb index fa4d63bff..0fe6b63af 100644 --- a/app/models/bank_transaction.rb +++ b/app/models/bank_transaction.rb @@ -32,7 +32,7 @@ class BankTransaction < ApplicationRecord end def autobindable? - binded? && registrar.present && invoice.payable? ? true : false + !binded? && registrar && invoice.payable? ? true : false rescue NoMethodError false end