Skip to content

Commit

Permalink
Merge pull request #95 from Chia-Network/fix/dont-commit-staging-reco…
Browse files Browse the repository at this point in the history
…rds-that-was-already-commited

fix: dont commit staging records that have already been commited
  • Loading branch information
MichaelTaylor3D authored Jan 3, 2022
2 parents b54381b + 419b9ce commit 736728e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/staging.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const commit = async (req, res) => {
{ where: { id: stagingRecordId } },
);

if (table === 'Projects') {
if (table === 'Projects' && !commited) {
switch (action) {
case 'INSERT':
fullNode.createProjectRecord(uuid, data, stagingRecordId);
Expand All @@ -87,7 +87,7 @@ export const commit = async (req, res) => {
fullNode.deleteProjectRecord(uuid, stagingRecordId);
break;
}
} else if (table === 'Unit') {
} else if (table === 'Unit' && !commited) {
switch (action) {
case 'INSERT':
fullNode.createUnitRecord(uuid, data, stagingRecordId);
Expand Down

0 comments on commit 736728e

Please sign in to comment.