From 6b038af87037c8820c214cead4e55e09f6ab7190 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 13 May 2020 14:09:14 +0000 Subject: [PATCH] --- server/AyaNova/DataList/AyaDataList.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/server/AyaNova/DataList/AyaDataList.cs b/server/AyaNova/DataList/AyaDataList.cs index 658529a9..bdc02437 100644 --- a/server/AyaNova/DataList/AyaDataList.cs +++ b/server/AyaNova/DataList/AyaDataList.cs @@ -140,12 +140,13 @@ namespace AyaNova.DataList using (var ct = AyaNova.Util.ServiceProviderProvider.DBContext) { var fc = ct.FormCustom.AsNoTracking().SingleOrDefault(x => x.FormKey == ayatypename); -#if (DEBUG) - if (fc == null) - { - throw new System.ArgumentNullException($"AyaDataList:GetCustomFieldDefinitionsForList, Custom field object type {ayatypename} has no FormCustom defined"); - } -#endif + //This is normal and expected in an empty db, removing this block + // #if (DEBUG) + // if (fc == null) + // { + // throw new System.ArgumentNullException($"AyaDataList:GetCustomFieldDefinitionsForList, Custom field object type {ayatypename} has no FormCustom defined"); + // } + // #endif //production handling of missing formcustom if (fc == null) continue; @@ -211,7 +212,7 @@ namespace AyaNova.DataList } - + }//eoc