Skip to content

Commit cfb7232

Browse files
committed
bugfix wrong cast leading to crash
1 parent 81a397f commit cfb7232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Jobbr.Server/ComponentServices/Management/JobQueryService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public PagedResult<JobRun> GetJobRunsByState(JobRunStates state, int page = 1, i
166166

167167
public PagedResult<JobRun> GetJobRunsByStates(JobRunStates[] states, int page = 1, int pageSize = 50, string jobTypeFilter = null, string jobUniqueNameFilter = null, string query = null, params string[] sort)
168168
{
169-
var statesCasted = states.Cast<ComponentModel.JobStorage.Model.JobRunStates>().ToArray();
169+
var statesCasted = states.Select(s => (ComponentModel.JobStorage.Model.JobRunStates)s).ToArray();
170170

171171
var jobruns = this.repository.GetJobRunsByStates(statesCasted, page, pageSize, jobTypeFilter, jobUniqueNameFilter, query, sort);
172172

0 commit comments

Comments
 (0)