This commit is contained in:
2020-01-16 00:45:36 +00:00
parent 8d39767e9d
commit 3c8bcdb7a9
2 changed files with 20 additions and 5 deletions

View File

@@ -267,8 +267,16 @@ namespace AyaNova.Biz
foreach (string s in fullFields) foreach (string s in fullFields)
{ {
ObjectField o = fields.FirstOrDefault(x => x.Key == s); ObjectField o = fields.FirstOrDefault(x => x.Key == s);
#if (DEBUG)
//Developers little helper
if (o == null)
{
throw new System.ArgumentNullException($"DEV ERROR in objectFields::GenerateListColumnsJSONFromTemplate - field {s} specified in template was NOT found in ObjectFields list for key \"{ObjectKey}\"");
}
#endif
if (o != null) if (o != null)
{//Here is where we can vet the field name, if it doesn't exist though, for now we'll just ignore those ones {//Here is where we can vet the field name, if it doesn't exist. For production we'll just ignore those ones
sb.Append(","); sb.Append(",");
sb.Append("{"); sb.Append("{");

View File

@@ -47,7 +47,14 @@ namespace AyaNova.Biz
foreach (string ColumnName in templateFieldList) foreach (string ColumnName in templateFieldList)
{ {
ObjectField o = objectFieldsList.FirstOrDefault(x => x.Key == s); ObjectField o = objectFieldsList.FirstOrDefault(x => x.Key == ColumnName);
#if (DEBUG)
//Developers little helper
if (o == null)
{
throw new System.ArgumentNullException($"DEV ERROR in SqlSelectBuilder.cs: field {ColumnName} specified in template was NOT found in ObjectFields list for key \"{objectKey}\"");
}
#endif
if (o != null) if (o != null)
{//Here is where we can vet the field name, if it doesn't exist though, for now we'll just ignore those ones {//Here is where we can vet the field name, if it doesn't exist though, for now we'll just ignore those ones