From 7adeaf93cd21bac1c6619f11f25b6d7c1e4536f4 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 28 Apr 2024 15:00:57 +0300 Subject: [PATCH] only active linked accounts --- app/views/templates/new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/templates/new.html.erb b/app/views/templates/new.html.erb index 5d0ac57f..80a1535f 100644 --- a/app/views/templates/new.html.erb +++ b/app/views/templates/new.html.erb @@ -3,9 +3,9 @@ <% if @base_template %> <%= hidden_field_tag :base_template_id, @base_template.id %> <% end %> - <% if @base_template && (can?(:manage, :tenants) || true_user != current_user) && true_user.account.account_linked_accounts.exists? %> + <% if @base_template && (can?(:manage, :tenants) || true_user != current_user) && true_user.account.account_linked_accounts.active.exists? %>
- <%= select_tag :account_id, options_for_select([true_user.account, *true_user.account.linked_accounts].uniq.map { |e| [e.name, e.id] }, current_account.id), required: true, class: 'base-select' %> + <%= select_tag :account_id, options_for_select([true_user.account, *true_user.account.linked_accounts.active].uniq.map { |e| [e.name, e.id] }, current_account.id), required: true, class: 'base-select' %>
<% end %>