|
|
@@ -51,11 +51,11 @@ const updateDateTimeRange = async (dates: Array<Date>): Promise<any> => {
|
|
|
setDirty(false)
|
|
|
pageStore.loading = true
|
|
|
|
|
|
- await em.patch(
|
|
|
- Access,
|
|
|
- accessProfileStore.id,
|
|
|
- {'historical': accessProfileStore.historical}
|
|
|
- )
|
|
|
+ await em.patch(Access, accessProfileStore.id, {'historical': accessProfileStore.historical})
|
|
|
+ if (process.server) {
|
|
|
+ // Force profile refresh server side to avoid a bug where server and client stores diverge on profile refresh
|
|
|
+ await em.refreshProfile()
|
|
|
+ }
|
|
|
|
|
|
window.location.reload()
|
|
|
}
|