Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 committed Dec 27, 2023
1 parent 57a9acc commit 6e232c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,10 @@ public boolean changeTaskLifeRecyle(Integer taskId, JobLifeCycle lifeCycle) thro
boolean saved = saveOrUpdate(task.buildTask());
if (saved && Asserts.isNotNull(task.getJobInstanceId())) {
JobInstance jobInstance = jobInstanceService.getById(task.getJobInstanceId());
jobInstance.setStep(lifeCycle.getValue());
boolean updatedJobInstance = jobInstanceService.updateById(jobInstance);
if (updatedJobInstance) {
jobInstanceService.refreshJobInfoDetail(jobInstance.getId(), true);
if (Asserts.isNotNull(jobInstance)) {
jobInstance.setStep(lifeCycle.getValue());
boolean updatedJobInstance = jobInstanceService.updateById(jobInstance);
if (updatedJobInstance) jobInstanceService.refreshJobInfoDetail(jobInstance.getId(), true);
log.warn(
"JobInstance [{}] step change to [{}] ,Trigger Force Refresh",
jobInstance.getName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ export const buildStepValue = (step: number) => {
return {
title: l('global.table.lifecycle.dev'),
status: 'processing',
color: '#1890ff'
color: 'cyan'
};
case 2:
return {
title: l('global.table.lifecycle.online'),
status: 'success',
color: '#52c41a'
color: 'purple'
};
default:
return {
title: l('global.table.lifecycle.dev'),
status: 'default',
color: '#1890ff'
color: 'cyan'
};
}
};
Expand Down Expand Up @@ -144,7 +144,8 @@ export const buildProjectTree = (
<>
<Badge
title={stepValue.title}
status={(stepValue.status as PresetStatusColorType) ?? 'default'}
color={stepValue.color}
// status={(stepValue.status as PresetStatusColorType) ?? 'default'}
/>
</>
);
Expand Down

0 comments on commit 6e232c6

Please sign in to comment.