From 019758405e5083bdeaefa309c23e2aef20161368 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Mon, 1 Jun 2020 23:49:41 +0300 Subject: [PATCH] Fix last operation --- models/vehicle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/vehicle.js b/models/vehicle.js index 8bbca8f..8a6bf5a 100644 --- a/models/vehicle.js +++ b/models/vehicle.js @@ -72,7 +72,7 @@ class Vehicle { v.ownershipPeriods = report.RequestResult.ownershipPeriods.ownershipPeriod.map(p => { let period = { - lastOperation: Constants[p.lastOperation] ?? p.lastOperation, + lastOperation: Constants.typeOperation[p.lastOperation] ?? p.lastOperation, ownerType: p.simplePersonType.toLowerCase() == 'legal' ? 'legal' : 'individual', from: Date.parse(p.from), to: 0