Skip to content

Commit 2ac716f

Browse files
committed
Fixing broken handling of tasks.
1 parent f34d9b0 commit 2ac716f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationTaskWizardService/BackendConfigurationTaskWizardService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ public async Task<OperationResult> UpdateTask(TaskWizardCreateModel updateModel)
763763
.Include(x => x.NameTranslations)
764764
.Include(x => x.PlanningsTags)
765765
.Include(x => x.PlanningSites)
766-
.FirstAsync(x => x.WorkflowState != Constants.WorkflowStates.Removed);
766+
.FirstAsync();
767767

768768
foreach (var site in sitesToAdd
769769
.Select(x =>
@@ -780,6 +780,11 @@ public async Task<OperationResult> UpdateTask(TaskWizardCreateModel updateModel)
780780
await site.Create(_backendConfigurationPnDbContext);
781781
}
782782

783+
if (planning.WorkflowState == Constants.WorkflowStates.Removed)
784+
{
785+
planning.WorkflowState = Constants.WorkflowStates.Created;
786+
}
787+
783788
foreach (var site in sitesToRemove.Select(siteId =>
784789
areaRulePlanning.PlanningSites.First(x => x.SiteId == siteId)))
785790
{

0 commit comments

Comments
 (0)