From e24181a3f4c78558e46b973b02f5082bcab0b4d2 Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Wed, 1 Nov 2023 12:36:17 -0700 Subject: [PATCH] psp-7162 avoid lease details race condition after updating lease. --- source/frontend/src/features/leases/hooks/useLeaseDetail.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/frontend/src/features/leases/hooks/useLeaseDetail.ts b/source/frontend/src/features/leases/hooks/useLeaseDetail.ts index 4db4f5b9e1..5ff359984a 100644 --- a/source/frontend/src/features/leases/hooks/useLeaseDetail.ts +++ b/source/frontend/src/features/leases/hooks/useLeaseDetail.ts @@ -101,9 +101,9 @@ export function useLeaseDetail(leaseId?: number) { return { lease, setLease, - refresh: () => { + refresh: async () => { setStaleLastUpdatedBy(true); - getCompleteLease(); + await getCompleteLease(); }, getCompleteLease, loading: loading,