Commit 5dd85ce3 authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf Committed by Nicolas Frandeboeuf

Fix m6 migration (operationTypeID not deleted)

parent c9da4fed
...@@ -242,14 +242,16 @@ let migrations = [ ...@@ -242,14 +242,16 @@ let migrations = [
} }
for (let operation of operations) { for (let operation of operations) {
let type;
if (operation.operationTypeID && typeMap.has(operation.operationTypeID)) { if (operation.operationTypeID && typeMap.has(operation.operationTypeID)) {
operation.type = typeMap.get(operation.operationTypeID); type = typeMap.get(operation.operationTypeID);
} else { } else {
operation.type = UNKNOWN_OPERATION_TYPE; type = UNKNOWN_OPERATION_TYPE;
} }
delete operation.operationTypeID; await Transactions.update(userId, operation.id, {
let update = { type: operation.type }; type,
await Transactions.update(userId, operation.id, update); operationTypeID: null
});
} }
// Delete operation types // Delete operation types
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment