From 05394eeacb65ef87f7399abb13533a4c9ad56439 Mon Sep 17 00:00:00 2001 From: Ian <52504170+ibacher@users.noreply.github.com> Date: Fri, 31 Mar 2023 13:22:11 -0400 Subject: [PATCH] (fix) No need to update location when updating locale (#656) --- .../components/choose-locale/change-locale.resource.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/apps/esm-primary-navigation-app/src/components/choose-locale/change-locale.resource.tsx b/packages/apps/esm-primary-navigation-app/src/components/choose-locale/change-locale.resource.tsx index 2acd9128c..690653176 100644 --- a/packages/apps/esm-primary-navigation-app/src/components/choose-locale/change-locale.resource.tsx +++ b/packages/apps/esm-primary-navigation-app/src/components/choose-locale/change-locale.resource.tsx @@ -1,8 +1,6 @@ import { openmrsFetch, queueSynchronizationItemFor, - getSessionLocation, - setSessionLocation, } from "@openmrs/esm-framework/src/internal"; import { userPropertyChange } from "../../constants"; @@ -17,19 +15,12 @@ export async function postUserPropertiesOnline( userProperties: any, abortController: AbortController ): Promise { - const sessionLocation = await getSessionLocation(); - const locationUuid = sessionLocation?.uuid; - await openmrsFetch(`/ws/rest/v1/user/${userUuid}`, { method: "POST", body: { userProperties }, headers: { "Content-Type": "application/json" }, signal: abortController.signal, }); - - if (locationUuid) { - await setSessionLocation(locationUuid, abortController); - } } export type PostSessionLocale = (