Commit 0483faf6 authored by Volker Krause's avatar Volker Krause
Browse files

Only add class information when actually available

This will for example be empty on non-RCT2 U_TLAY blocks.
parent e6cc47b2
......@@ -74,9 +74,12 @@ void Uic9183DocumentProcessor::preExtract(ExtractorDocumentNode &node, [[maybe_u
QJsonObject provider;
provider.insert(QLatin1String("@type"), QLatin1String("Organization"));
provider.insert(QLatin1String("identifier"), QJsonValue(QLatin1String("uic:") + p.carrierId()));
QJsonObject seat;
seat.insert(QLatin1String("@type"), QLatin1String("Seat"));
seat.insert(QLatin1String("seatingType"), p.seatingType());
if (const auto seatingType = p.seatingType(); !seatingType.isEmpty()) {
seat.insert(QLatin1String("seatingType"), seatingType);
}
const auto rct2 = p.rct2Ticket();
if (rct2.isValid()) {
......
Supports Markdown
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