fix: Reset IsLatest also for not published workflows on PublishAsync

When an unpublished workflow is published, IsLatest is not set to false because the PublishAsync method was only looking for published workflows.
This commit is contained in:
dcamarenaAZO 2021-07-14 07:45:26 +02:00 committed by GitHub
parent dbb91a816a
commit 197db28702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ namespace Elsa.Services.Workflows
{
var publishedDefinition = await _workflowDefinitionStore.FindByDefinitionIdAsync(
workflowDefinition.DefinitionId,
VersionOptions.Published,
VersionOptions.LatestOrPublished,
cancellationToken);
if (publishedDefinition != null)
@ -177,4 +177,4 @@ namespace Elsa.Services.Workflows
return workflowDefinition;
}
}
}
}