Skip to content

Commit

Permalink
SCKAN-323 fix: Update frontend to send new owner_id on retry
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsobspinto committed Nov 14, 2024
1 parent a8e19d3 commit f19f66d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/services/StatementService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ class ConnectivityStatementService extends AbstractService {
return await checkOwnership(
id,
// Retry the update after ownership is reassigned, including new owner ID
async () => {
const updatedStatement = {
...connectivityStatement,
};
async (fetchedData, userId) => {
// Update the statement with the new ownership if reassigned
const updatedStatement = { ...connectivityStatement, owner_id: userId };
await composerApi.composerConnectivityStatementUpdate(id, updatedStatement).then((response: any) => response.data);
return ChangeRequestStatus.SAVED;
},
Expand Down

0 comments on commit f19f66d

Please sign in to comment.