Fix autobindable? condition

This commit is contained in:
Karl Erik Õunapuu 2020-09-08 11:14:26 +03:00
parent 5991ea6be7
commit c7d768fbed
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -32,7 +32,7 @@ class BankTransaction < ApplicationRecord
end end
def autobindable? def autobindable?
binded? && registrar.present && invoice.payable? ? true : false !binded? && registrar && invoice.payable? ? true : false
rescue NoMethodError rescue NoMethodError
false false
end end