Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign false to the POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED Onyx key when the fetching of connections data fails #40375

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/libs/actions/PolicyConnections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,29 @@ function openPolicyAccountingPage(policyID: string) {
value: false,
},
];
const finallyData: OnyxUpdate[] = [
const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: hasConnectionsDataBeenFetchedKey,
value: true,
},
];
const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: hasConnectionsDataBeenFetchedKey,
value: false,
},
];

const parameters: OpenPolicyAccountingPageParams = {
policyID,
};

API.read(READ_COMMANDS.OPEN_POLICY_ACCOUNTING_PAGE, parameters, {
optimisticData,
finallyData,
successData,
failureData,
});
}

Expand Down
Loading