This commit is contained in:
@@ -138,18 +138,7 @@ namespace AyaNova.Biz
|
||||
else
|
||||
AddError(ApiErrorCode.CONCURRENCY_CONFLICT);
|
||||
return null;
|
||||
}
|
||||
catch (Microsoft.EntityFrameworkCore.DbUpdateException ex)
|
||||
{
|
||||
if (ex.InnerException != null && ex.InnerException.Message.Contains("unq_unitmodelnumbervendorid"))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "number", "Model number plus VendorId combination must be unique");
|
||||
return null;
|
||||
}
|
||||
|
||||
throw;
|
||||
|
||||
}
|
||||
}
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.Id, BizType, AyaEvent.Modified), ct);
|
||||
await SearchIndexAsync(putObject, false);
|
||||
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, putObject.Tags, dbObject.Tags);
|
||||
|
||||
@@ -715,6 +715,11 @@ namespace AyaNova.Biz
|
||||
|
||||
//TODO: Validation rules that require future other objects that aren't present yet:
|
||||
/*
|
||||
|
||||
|
||||
//MIGRATE_OUTSTANDING TODO: role changes when has things that require a role like notification subscriptions and others
|
||||
|
||||
|
||||
//Don't allow to go from non scheduleable if there are any scheduled workorder items because
|
||||
//it would damage the history
|
||||
BrokenRules.Assert("UserType","User.Label.MustBeScheduleable","UserType",(mUserType==UserTypes.Schedulable) && (ScheduledUserCount(this.mID,false)>0));
|
||||
|
||||
Reference in New Issue
Block a user