Add at least one BankAccount to the reference_calculator
This commit is contained in:
parent
d52315287d
commit
5f2e319469
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ class HomeController < ApplicationController
|
|||
if current_user.ordergroup
|
||||
@types = FinancialTransactionType.with_name_short.order(:name)
|
||||
@bank_accounts = @types.includes(:bank_account).map(&:bank_account).uniq.compact
|
||||
@bank_accounts = [BankAccount.last] if @bank_accounts.empty?
|
||||
else
|
||||
redirect_to root_url, alert: I18n.t('group_orders.errors.no_member')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue