From dccf06cb0c5461c0d18b5571d6ab92c51a6f3bdf Mon Sep 17 00:00:00 2001 From: Zhihe Li Date: Thu, 25 Apr 2024 11:48:55 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20error=20when=20dele?= =?UTF-8?q?ting=20auth=20method=20(#2273)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-13624 --- ui/admin/app/controllers/scopes/scope/auth-methods/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/admin/app/controllers/scopes/scope/auth-methods/index.js b/ui/admin/app/controllers/scopes/scope/auth-methods/index.js index 520c1f49e..e31aee737 100644 --- a/ui/admin/app/controllers/scopes/scope/auth-methods/index.js +++ b/ui/admin/app/controllers/scopes/scope/auth-methods/index.js @@ -142,11 +142,11 @@ export default class ScopesScopeAuthMethodsIndexController extends Controller { @notifyError(({ message }) => message, { catch: true }) @notifySuccess('notifications.delete-success') async delete(authMethod) { + const scopeID = authMethod.scopeID; await authMethod.destroyRecord(); // Reload the scope, since this is where the primary_auth_method_id is // stored. An auth method deletion could affect this field. - const scope = this.store.peekRecord('scope', authMethod.scopeID); - await scope.reload(); + await this.store.findRecord('scope', scopeID, { reload: true }); this.router.replaceWith('scopes.scope.auth-methods'); await this.router.refresh(); }