This commit is contained in:
@@ -348,9 +348,7 @@ namespace AyaNova.Biz
|
||||
await ValidateCanDelete(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
//Remove the object
|
||||
ct.User.Remove(dbObject);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
//Delete sibling objects
|
||||
//USEROPTIONS
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from auseroptions where userid = {dbObject.Id}");
|
||||
@@ -365,6 +363,11 @@ namespace AyaNova.Biz
|
||||
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, BizType, ct);
|
||||
await TagBiz.ProcessDeleteTagsInRepositoryAsync(ct, dbObject.Tags);
|
||||
await FileUtil.DeleteAttachmentsForObjectAsync(BizType, dbObject.Id, ct);
|
||||
|
||||
//Remove the object
|
||||
ct.User.Remove(dbObject);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
await transaction.CommitAsync();
|
||||
await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Deleted, dbObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user