Skip to content

Commit 9166d71

Browse files
authored
Merge pull request #1260 from danyhoron/master
fix: prevent redis provider from crashing when using deleteComplete
2 parents 09cd773 + 04c116c commit 9166d71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/providers/WorkflowCore.Providers.Redis/Services/RedisPersistenceProvider.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ public Task<IEnumerable<WorkflowInstance>> GetWorkflowInstances(WorkflowStatus?
9292
public async Task<WorkflowInstance> GetWorkflowInstance(string Id, CancellationToken _ = default)
9393
{
9494
var raw = await _redis.HashGetAsync($"{_prefix}.{WORKFLOW_SET}", Id);
95+
if (!raw.HasValue)
96+
{
97+
return null;
98+
}
9599
return JsonConvert.DeserializeObject<WorkflowInstance>(raw, _serializerSettings);
96100
}
97101

0 commit comments

Comments
 (0)