Skip to content

Commit

Permalink
Merge pull request #442 from Chia-Network/fix-editing-a-unit-deletes-…
Browse files Browse the repository at this point in the history
…the-existing-issuance-on-it

fix: editing a unit deletes the existing issuance on it
  • Loading branch information
MichaelTaylor3D authored Apr 6, 2022
2 parents e60a709 + 3d7a8c5 commit fd364e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ export const update = async (req, res) => {
// if we are reusing a record, make sure it exists
await assertRecordExistance(Issuance, updatedRecord.issuance.id);
updatedRecord.issuanceId = updatedRecord.issuance.id;

delete updatedRecord.issuance;
updatedRecord.issuance.orgUid = orgUid;
} else {
updatedRecord.issuance.id = uuidv4();
updatedRecord.issuance.orgUid = orgUid;
Expand Down

0 comments on commit fd364e8

Please sign in to comment.