Skip to content

Commit

Permalink
#3251 Import device - data overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
E068097 committed Nov 14, 2024
1 parent 62affdb commit a819370
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/IoTHub.Portal.Server/Managers/ExportManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,7 @@ private List<string> GetPropertiesToExport()
nameof(LoRaDeviceDetails.AppSKey),
nameof(LoRaDeviceDetails.NwkSKey),
nameof(LoRaDeviceDetails.DevAddr),
nameof(LoRaDeviceDetails.GatewayID),
nameof(LoRaDeviceDetails.Downlink),
nameof(LoRaDeviceDetails.ClassType),
nameof(LoRaDeviceDetails.PreferredWindow),
nameof(LoRaDeviceDetails.Deduplication),
nameof(LoRaDeviceDetails.RX1DROffset),
nameof(LoRaDeviceDetails.RX2DataRate),
nameof(LoRaDeviceDetails.RXDelay),
nameof(LoRaDeviceDetails.ABPRelaxMode),
nameof(LoRaDeviceDetails.SensorDecoder),
nameof(LoRaDeviceDetails.FCntUpStart),
nameof(LoRaDeviceDetails.FCntDownStart),
nameof(LoRaDeviceDetails.FCntResetCounter),
nameof(LoRaDeviceDetails.Supports32BitFCnt),
nameof(LoRaDeviceDetails.KeepAliveTimeout)
nameof(LoRaDeviceDetails.GatewayID)
});
}

Expand Down Expand Up @@ -300,20 +286,6 @@ private async Task ImportLoRaDevice(
newDevice.AppKey = null;
}
TryReadProperty(csvReader, newDevice, c => c.GatewayID, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.Downlink, null);
TryReadProperty(csvReader, newDevice, c => c.ClassType, ClassType.A);
TryReadProperty(csvReader, newDevice, c => c.PreferredWindow, 1);
TryReadProperty(csvReader, newDevice, c => c.Deduplication, DeduplicationMode.Drop);
TryReadProperty(csvReader, newDevice, c => c.RX1DROffset, null);
TryReadProperty(csvReader, newDevice, c => c.RX2DataRate, null);
TryReadProperty(csvReader, newDevice, c => c.RXDelay, null);
TryReadProperty(csvReader, newDevice, c => c.ABPRelaxMode, null);
TryReadProperty(csvReader, newDevice, c => c.SensorDecoder, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.FCntUpStart, null);
TryReadProperty(csvReader, newDevice, c => c.FCntDownStart, null);
TryReadProperty(csvReader, newDevice, c => c.FCntResetCounter, null);
TryReadProperty(csvReader, newDevice, c => c.Supports32BitFCnt, null);
TryReadProperty(csvReader, newDevice, c => c.KeepAliveTimeout, null);

_ = await this.loraDeviceService.CheckIfDeviceExists(newDevice.DeviceID)
? await this.loraDeviceService.UpdateDevice(newDevice)
Expand Down

0 comments on commit a819370

Please sign in to comment.