Skip to content

Commit

Permalink
fix: removing an issuance from the unit deletes it from the datalayer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandradumitru22 committed Apr 8, 2022
1 parent b1f2617 commit 6a18015
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ export const update = async (req, res) => {
updatedRecord.issuance.id = uuidv4();
updatedRecord.issuance.orgUid = orgUid;
}
} else {
updatedRecord.issuance = originalRecord.issuance;
updatedRecord.issuanceId = null;
}

// merge the new record into the old record
Expand Down

0 comments on commit 6a18015

Please sign in to comment.