This commit is contained in:
@@ -396,7 +396,10 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
public SearchIndexProcessObjectParameters AddWord(string s)
|
public SearchIndexProcessObjectParameters AddWord(string s)
|
||||||
{
|
{
|
||||||
Words.Add(s);
|
if (!string.IsNullOrWhiteSpace(s))
|
||||||
|
{
|
||||||
|
Words.Add(s);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public SearchIndexProcessObjectParameters AddWord(uint u)
|
public SearchIndexProcessObjectParameters AddWord(uint u)
|
||||||
@@ -406,9 +409,15 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
public SearchIndexProcessObjectParameters AddWord(List<string> lWords)
|
public SearchIndexProcessObjectParameters AddWord(List<string> lWords)
|
||||||
{
|
{
|
||||||
foreach (string s in lWords)
|
if (lWords != null)
|
||||||
{
|
{
|
||||||
Words.Add(s);
|
foreach (string s in lWords)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(s))
|
||||||
|
{
|
||||||
|
Words.Add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -88,7 +88,12 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
public static void ProcessUpdateTagsInRepository(AyContext ct, List<string> newTags, List<string> originalTags = null)
|
public static void ProcessUpdateTagsInRepository(AyContext ct, List<string> newTags, List<string> originalTags = null)
|
||||||
{
|
{
|
||||||
if (newTags.Count == 0 && (originalTags == null || originalTags.Count == 0)) return;
|
//just in case no new tags are present which could mean a user removed all tags from a record so this
|
||||||
|
//needs to proceed with the code below even if newTags is null as long as originalTags isn't also null
|
||||||
|
if (newTags == null) newTags = new List<string>();
|
||||||
|
if (originalTags == null) originalTags = new List<string>();
|
||||||
|
|
||||||
|
if (newTags.Count == 0 && originalTags.Count == 0) return;
|
||||||
|
|
||||||
List<string> deleteTags = new List<string>();
|
List<string> deleteTags = new List<string>();
|
||||||
List<string> addTags = new List<string>();
|
List<string> addTags = new List<string>();
|
||||||
|
|||||||
Reference in New Issue
Block a user