From f22b812060d22d042b44dea1d0c7a3e989c905ef Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Tue, 16 Aug 2022 21:21:50 +0300 Subject: [PATCH] fix: fix database error when adding filtered data Command option set when error was occuring: netxml2kml -di -q '' --- netxml2kml/Methods/CliOptionsHandlers.cs | 4 +++- netxml2kml/netxml2kml.csproj | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/netxml2kml/Methods/CliOptionsHandlers.cs b/netxml2kml/Methods/CliOptionsHandlers.cs index de1e4ae..9baec16 100644 --- a/netxml2kml/Methods/CliOptionsHandlers.cs +++ b/netxml2kml/Methods/CliOptionsHandlers.cs @@ -69,7 +69,8 @@ public static class CliOptionsHandlers private static string GetKmlString(IEnumerable wirelessNetworks, string name = "WiFi Map", - string description = $"Autogenerated by a tool.\nhttps://github.com/cuqmbr/netxml2kml") + string description = $"Autogenerated by a tool." + + $"\nhttps://github.com/cuqmbr/netxml2kml") { var kmlTree = new XDocument(); @@ -162,6 +163,7 @@ public static class CliOptionsHandlers foreach (var wirelessConnection in wirelessNetwork.WirelessConnections) { var client = wirelessConnection.WirelessClient; + client.WirelessConnections = null!; // Add new client to the DB if it is not present if (!dbContext.WirelessClients.Any(wc => diff --git a/netxml2kml/netxml2kml.csproj b/netxml2kml/netxml2kml.csproj index bae0828..46bbb5c 100644 --- a/netxml2kml/netxml2kml.csproj +++ b/netxml2kml/netxml2kml.csproj @@ -12,6 +12,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive +