Fix Clearing modules from the Recycle Bin

Modules and all related records now correctly deleted from the database.
This commit is contained in:
Leigh Pointer 2023-03-06 06:26:01 +01:00
parent 7871f0f3ce
commit 90ed767d75

View File

@ -185,7 +185,7 @@ else
await PageModuleService.DeletePageModuleAsync(module.PageModuleId);
// check if there are any remaining module instances in the site
if (!_modules.Exists(item => item.ModuleId == module.ModuleId))
if (_modules.Exists(item => item.ModuleId == module.ModuleId))
{
await ModuleService.DeleteModuleAsync(module.ModuleId);
}
@ -211,7 +211,7 @@ else
await PageModuleService.DeletePageModuleAsync(module.PageModuleId);
// check if there are any remaining module instances in the site
if (!_modules.Exists(item => item.ModuleId == module.ModuleId))
if (_modules.Exists(item => item.ModuleId == module.ModuleId))
{
await ModuleService.DeleteModuleAsync(module.ModuleId);
}