From 69f8d7aaa56f309756fa1010f6b878a425b126d1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 20 Aug 2021 22:16:53 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 1f704b2..59c3023 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -210,6 +210,7 @@ namespace AyaNova.PlugIn.V8 private async System.Threading.Tasks.Task Getv7v8IdMap(Guid id, RootObjectTypes desiredType, bool allowPatch = true, bool doNotFail = true, long? extraV8Id = null) { + if (!V7ToV8IdMap.ContainsKey(id)) { if (!allowPatch && !doNotFail) @@ -218,6 +219,8 @@ namespace AyaNova.PlugIn.V8 return 0; //not found, patch allowed, create a substitute record for it and put it in the map + if (id == Guid.Empty) + throw new Exception("Error: Getv7v8IdMap (source id: " + id.ToString() + " for type: " + desiredType.ToString() + ") attempt to create substitute record for empty id, this is an unexpected error, please provide full export log to technical support"); await CreateSubstitute(id, desiredType, extraV8Id); } return V7ToV8IdMap[id]; @@ -1948,7 +1951,7 @@ namespace AyaNova.PlugIn.V8 d.dateStarted = util.DateToV8(c.DateStarted, true); d.dateCompleted = util.DateToV8(c.DateCompleted, false); d.accountNumber = c.AccountNumber; - d.projectOverseerId = await Getv7v8IdMap(c.ProjectOverseerID, RootObjectTypes.User); + d.projectOverseerId = await Getv7v8IdMapNullOk(c.ProjectOverseerID, RootObjectTypes.User); TagFromv7Guid(c.RegionID, tags); SetTags(d, tags); //Custom fields?