diff --git a/packet-store.js b/packet-store.js index d7553f1..93f9e9c 100644 --- a/packet-store.js +++ b/packet-store.js @@ -308,7 +308,9 @@ class PacketStore { // Also write to normalized tables and get the transmission ID const txResult = this.dbModule.insertTransmission ? this.dbModule.insertTransmission(packetData) : null; const transmissionId = txResult ? txResult.transmissionId : null; - const row = this.dbModule.getPacket(id); + // Use transmissionId to fetch from packets_v (which is based on transmissions+observations) + const lookupId = transmissionId || id; + const row = this.dbModule.getPacket(lookupId); if (row && !this.sqliteOnly) { // Update or create transmission in memory let tx = this.byHash.get(row.hash);