Fix missing GatewayStats v4_migrate.

This is needed as the gateway_id field has changed from bytes to string
(as the Protobuf JSON mapping encodes bytes to base64).
This commit is contained in:
Orne Brocaar
2022-08-01 12:08:08 +01:00
parent 54d582504f
commit d7a4334b77
2 changed files with 9 additions and 0 deletions

8
api/rust/src/gw.rs vendored
View File

@ -277,3 +277,11 @@ impl DownlinkTxAck {
}
}
}
impl GatewayStats {
pub fn v4_migrate(&mut self) {
if self.gateway_id.is_empty() {
self.gateway_id = hex::encode(&self.gateway_id_legacy);
}
}
}