From 93db49c5d302ac395c194438c2cb4924cb6b7e96 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 24 Dec 2020 20:40:02 +0000 Subject: [PATCH] --- server/AyaNova/Controllers/DataListController.cs | 1 + server/AyaNova/biz/AyaFormFieldDefinitions.cs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/AyaNova/Controllers/DataListController.cs b/server/AyaNova/Controllers/DataListController.cs index fc3636af..c24b72b4 100644 --- a/server/AyaNova/Controllers/DataListController.cs +++ b/server/AyaNova/Controllers/DataListController.cs @@ -95,6 +95,7 @@ namespace AyaNova.Api.Controllers [HttpGet("listkeys")] public ActionResult GetDataListKeys() { + //NOTE: not used by AyaNova Client, convenience method for developers api usage if (!serverState.IsOpen) return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); diff --git a/server/AyaNova/biz/AyaFormFieldDefinitions.cs b/server/AyaNova/biz/AyaFormFieldDefinitions.cs index 468eead3..98ac4461 100644 --- a/server/AyaNova/biz/AyaFormFieldDefinitions.cs +++ b/server/AyaNova/biz/AyaFormFieldDefinitions.cs @@ -16,7 +16,7 @@ namespace AyaNova.Biz public static List AyaFormFieldDefinitionKeys { get - { + { if (_ayaFormFieldDefinitionKeys == null) { _ayaFormFieldDefinitionKeys = new List(); @@ -38,15 +38,14 @@ namespace AyaNova.Biz public static bool IsValidFormFieldDefinitionKey(string key) { - System.Diagnostics.Debugger.Log(1, "DEV_TEST", $"AyaFormFieldDefinitions::IsValidFormFieldDefinitionKey {key}\n"); return AyaFormFieldDefinitionKeys.Contains(key); } public static List AyaFormFields(string key) - { + { //Initialize the static list here on first retrieval if (_ayaFormFields == null) - { + { _ayaFormFields = new Dictionary>(); /* ***************************** WARNING: Be careful here, if a standard field is hideable and also it's DB SCHEMA is set to NON NULLABLE then the CLIENT end needs to set a default ***************************** Otherwise the hidden field can't be set and the object can't be saved EVER