Skip to content

Commit

Permalink
fix: Error when attempting to Delete User-Associated Accounts via Sup…
Browse files Browse the repository at this point in the history
…er Admin Console (#7810)

This pull request addresses the issue where an error is encountered while attempting to delete user-associated accounts through the Super Admin Console. The problem arises from an error that occurs when the "destroy" action is triggered on an associated account.

Fixes: #7809
  • Loading branch information
smtbos committed Sep 20, 2023
1 parent f8cb806 commit 0ad2f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/super_admin/users/_collection.html.erb
Expand Up @@ -83,7 +83,7 @@ to display a collection of resources in an HTML table.
<% if existing_action? collection_presenter.resource_name, :destroy %>
<td><%= link_to(
t("administrate.actions.destroy"),
[namespace, resource.becomes(User)],
[namespace, collection_presenter.resource_name == 'account_user' ? resource : resource.becomes(User)],
class: "text-color-red",
method: :delete,
data: { confirm: t("administrate.actions.confirm") }
Expand Down

0 comments on commit 0ad2f94

Please sign in to comment.