From 10e8738addd529c968b7f15684a068e1966718b5 Mon Sep 17 00:00:00 2001 From: ASemenchuk <59782501+Botinoc@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:43:38 +0300 Subject: [PATCH] Update CiscoCommands.cs --- CiscoMigration/CiscoCommands.cs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/CiscoMigration/CiscoCommands.cs b/CiscoMigration/CiscoCommands.cs index 611fecc0..ee900eac 100644 --- a/CiscoMigration/CiscoCommands.cs +++ b/CiscoMigration/CiscoCommands.cs @@ -1484,20 +1484,23 @@ public override void Parse(CiscoCommand command, CiscoCommand prevCommand, Dicti if (ciscoIds.ContainsKey(DestinationIp)) { - var refObj = (Cisco_Object)ciscoIds[DestinationIp]; - if (refObj != null) + if (ciscoIds[DestinationIp].GetType().Name != "Cisco_GroupObject") { - switch (refObj.ObjectType) + var refObj = (Cisco_Object)ciscoIds[DestinationIp]; + if (refObj != null) { - case Cisco_Object.ObjectTypes.Host: - DestinationIp = refObj.HostAddress; - destinationIpResolved = true; - break; + switch (refObj.ObjectType) + { + case Cisco_Object.ObjectTypes.Host: + DestinationIp = refObj.HostAddress; + destinationIpResolved = true; + break; - case Cisco_Object.ObjectTypes.Network: - DestinationIp = refObj.Network; - destinationIpResolved = true; - break; + case Cisco_Object.ObjectTypes.Network: + DestinationIp = refObj.Network; + destinationIpResolved = true; + break; + } } } }