This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user