stop inserting and changing deleted unlock incidents

This commit is contained in:
Bilal Catic
2020-01-09 23:23:28 +01:00
parent 280e8af748
commit 62dc399a1a
2 changed files with 10 additions and 3 deletions

View File

@@ -126,7 +126,6 @@ const insertUnlockedIncidents = (incidents) => {
bookingStart: start,
bookingEnd: end,
unlockTimestamp,
incidentLevel,
},
defaults: {...incidentForDB},
}));
@@ -198,7 +197,7 @@ const setUnlockedIncidentsLevel = (incidents) => {
const incidentsWithLevel = [];
incidents.forEach((incident) => {
const memberLastIncident = membersLastIncident[incident.memberId];
const memberLastIncident = Object.assign({}, membersLastIncident[incident.memberId]);
const formattedIncident = {
reservation: incident.reservation,