diff --git a/server/AyaNova/biz/MemoBiz.cs b/server/AyaNova/biz/MemoBiz.cs index 78f412e8..97bcdb96 100644 --- a/server/AyaNova/biz/MemoBiz.cs +++ b/server/AyaNova/biz/MemoBiz.cs @@ -213,21 +213,24 @@ namespace AyaNova.Biz bool isNew = currentObj == null; - //Name required + //Name ("subject") is still required for a memo, empty subject not valid + //also, subject was required by biz rule in v7 so no need to worry about that on migrate if (string.IsNullOrWhiteSpace(proposedObj.Name)) AddError(ApiErrorCode.VALIDATION_REQUIRED, "Name"); + //Name does *NOT* need to be unique because for memo it's actually the subject line + //just kept internal naming the same to make coding easier with less workarounds - //If name is otherwise OK, check that name is unique - if (!PropertyHasErrors("Name")) - { - //Use Any command is efficient way to check existance, it doesn't return the record, just a true or false - if (await ct.Memo.AnyAsync(m => m.Name == proposedObj.Name && m.Id != proposedObj.Id)) - { - AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Name"); - } - } + // //If name is otherwise OK, check that name is unique + // if (!PropertyHasErrors("Name")) + // { + // //Use Any command is efficient way to check existance, it doesn't return the record, just a true or false + // if (await ct.Memo.AnyAsync(m => m.Name == proposedObj.Name && m.Id != proposedObj.Id)) + // { + // AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Name"); + // } + // } //Any form customizations to validate?