Skip to content

Commit 333d9a8

Browse files
fixing casting at loading
1 parent eb046c7 commit 333d9a8

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/application/ApplicationThunks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ export const initializeApplicationAsStandaloneThunk =
639639
} else {
640640
dispatch(setDashboardToLoadAfterConnecting(`name:${config.standaloneDashboardName}`));
641641
}
642-
643642
dispatch(setParametersToLoadAfterConnecting(paramsToSetAfterConnecting));
643+
dispatch(updateGlobalParametersThunk(paramsToSetAfterConnecting));
644644

645645
if (clearNotificationAfterLoad) {
646646
dispatch(clearNotification());

src/dashboard/DashboardThunks.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { createLogThunk } from '../application/logging/LoggingThunk';
99
import { applicationGetConnectionUser, applicationIsStandalone } from '../application/ApplicationSelectors';
1010
import { applicationGetLoggingSettings } from '../application/logging/LoggingSelectors';
1111
import { NEODASH_VERSION, VERSION_TO_MIGRATE } from './DashboardReducer';
12-
import { Date as Neo4jDate } from 'neo4j-driver-core/lib/temporal-types.js';
1312

1413
export const removePageThunk = (number) => (dispatch: any, getState: any) => {
1514
try {
@@ -113,16 +112,6 @@ export const loadDashboardThunk = (uuid, text) => (dispatch: any, getState: any)
113112
throw `Invalid dashboard version: ${dashboard.version}. Try restarting the application, or retrieve your cached dashboard using a debug report.`;
114113
}
115114

116-
// Cast dashboard parameters from serialized format to correct types
117-
Object.keys(dashboard.settings.parameters).forEach((key) => {
118-
const value = dashboard.settings.parameters[key];
119-
120-
// Serialized Date to Neo4jDate
121-
if (value && value.year && value.month && value.day) {
122-
dashboard.settings.parameters[key] = new Neo4jDate(value.year, value.month, value.day);
123-
}
124-
});
125-
126115
// Reverse engineer the minimal set of fields from the selection loaded.
127116
dashboard.pages.forEach((p) => {
128117
p.reports.forEach((r) => {
@@ -140,8 +129,8 @@ export const loadDashboardThunk = (uuid, text) => (dispatch: any, getState: any)
140129
const { application } = getState();
141130

142131
dispatch(updateGlobalParametersThunk(application.parametersToLoadAfterConnecting));
132+
dispatch(updateGlobalParametersThunk(dashboard.settings.parameters));
143133
dispatch(setParametersToLoadAfterConnecting(null));
144-
145134
// Pre-2.3.4 dashboards might now always have a UUID. Set it if not present.
146135
if (!dashboard.uuid) {
147136
dispatch(setDashboardUuid(uuid));

0 commit comments

Comments
 (0)