fix: Error when attempting to Delete User-Associated Accounts via Super 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
This commit is contained in:
@@ -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") }
|
||||
|
||||
Reference in New Issue
Block a user