This commit is contained in:
2021-01-14 19:32:08 +00:00
parent 0636316651
commit 871076c9a0

View File

@@ -272,6 +272,12 @@ namespace AyaNova.Biz
}
}
//no duplicate parts
//this would be caused by an API user not our UI so no need to translation
if (proposedObj.Items.GroupBy(z => z.PartId).Any(g => g.Count() > 1))
{
AddError(ApiErrorCode.VALIDATION_FAILED, "Items", "Duplicate parts are not allowed in the items collection");
}
//Any form customizations to validate?
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.PartAssembly.ToString());