This commit is contained in:
@@ -131,16 +131,19 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
|
|
||||||
Translation t = new Translation();
|
Translation t = new Translation();
|
||||||
t.Name = (string)o["Name"];
|
var proposedName = (string)o["Name"];
|
||||||
string newUniqueName = string.Empty;
|
string newUniqueName = proposedName;
|
||||||
bool NotUnique = true;
|
bool NotUnique = true;
|
||||||
long l = 1;
|
long l = 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
newUniqueName = Util.StringUtil.UniqueNameBuilder(t.Name, l++, 255);
|
|
||||||
NotUnique = await ct.Translation.AnyAsync(z => z.Name == newUniqueName);
|
NotUnique = await ct.Translation.AnyAsync(z => z.Name == newUniqueName);
|
||||||
|
if (NotUnique)
|
||||||
|
newUniqueName = Util.StringUtil.UniqueNameBuilder(proposedName, l++, 255);
|
||||||
|
|
||||||
} while (NotUnique);
|
} while (NotUnique);
|
||||||
|
|
||||||
|
t.Name = newUniqueName;
|
||||||
t.CjkIndex = (bool)o["CjkIndex"];
|
t.CjkIndex = (bool)o["CjkIndex"];
|
||||||
t.Stock = false;
|
t.Stock = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user