Skip to content

Commit

Permalink
Alternative path for vehicle user's info.
Browse files Browse the repository at this point in the history
One of the application users reported missing `UsersSurnameOrBusinessName`
and `UsersAddress` fields. Closer inspection revealed that this
information is present at the `0x72, 0xA1, 0xA9` path, which is in
accordance with the "Council Directive 1999/37/EC of 29 April 1999 on
the registration documents for vehicles"
(https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A01999L0037-20180520).
Other fields (including `OwnerName`, `OwnersSurnameOrBusinessName`,
and `OwnerAddress`) on this user card were present at the paths
specified by Bas Celik.
  • Loading branch information
ubavic committed Jul 20, 2024
1 parent 9242459 commit 8bed487
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions card/vehicle.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ func readVehicleCard(card VehicleCard) (*document.VehicleDocument, error) {
data.assignFrom(&doc.UsersSurnameOrBusinessName, 0x71, 0xA1, 0xA9, 0x83)
data.assignFrom(&doc.UsersName, 0x71, 0xA1, 0xA9, 0x84)
data.assignFrom(&doc.UsersAddress, 0x71, 0xA1, 0xA9, 0x85)
if doc.UsersName == "" && doc.UsersSurnameOrBusinessName == "" && doc.UsersAddress == "" {
data.assignFrom(&doc.UsersSurnameOrBusinessName, 0x72, 0xA1, 0xA9, 0x83)
data.assignFrom(&doc.UsersName, 0x72, 0xA1, 0xA9, 0x84)
data.assignFrom(&doc.UsersAddress, 0x72, 0xA1, 0xA9, 0x85)
}

return &doc, nil
}
Expand Down

0 comments on commit 8bed487

Please sign in to comment.