Skip to content

Commit 5de81c9

Browse files
committed
fix mappings
1 parent 8c75f1d commit 5de81c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/models/Vehicle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ export class Vehicle implements Model {
2929
vehicle.id = data.id || '';
3030
vehicle.type = data.type || 'vehicles';
3131
vehicle.relationships = data.relationships || {};
32-
vehicle.attributes.registration = vehicle.relationships.author?.data?.id || '';
33-
vehicle.attributes.vin = vehicle.relationships.form?.data?.id || '';
34-
vehicle.attributes.description = vehicle.relationships.form_version?.data?.id || '';
32+
vehicle.attributes.registration = data.attributes.registration || '';
33+
vehicle.attributes.vin = data.attributes.vin || '';
34+
vehicle.attributes.description = data.attributes.description || '';
3535
vehicle.meta = data.meta || {};
3636
vehicle.links = data.links || {};
3737
}

0 commit comments

Comments
 (0)