Skip to content

Commit

Permalink
Merge pull request #38730 from bernhardoj/fix/37846-remove-failed-to-…
Browse files Browse the repository at this point in the history
…create-task

Clear the task report when it's failed to create
  • Loading branch information
AndrewGable authored Apr 9, 2024
2 parents 5bc7736 + 23f1dea commit 5b1dbea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,12 @@ function createTaskAndNavigate(
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${optimisticTaskReport.reportID}`,
value: {
errorFields: {
createTask: ErrorUtils.getMicroSecondOnyxError('task.genericCreateTaskFailureMessage'),
},
},
value: null,
},
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticTaskReport.reportID}`,
value: {[optimisticTaskCreatedAction.reportActionID]: {pendingAction: null}},
value: null,
},
];

Expand Down

0 comments on commit 5b1dbea

Please sign in to comment.