This commit is contained in:
2020-05-13 14:09:14 +00:00
parent bddc3222d8
commit 6b038af870

View File

@@ -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