|
@@ -29,12 +29,14 @@ class ScheduleService extends CrudService {
|
|
|
|
|
|
async checkNeedNext(id) {
|
|
|
const sch = await this.model.findById(id);
|
|
|
- const { red_branch, blue_branch, match_id } = sch;
|
|
|
+ const { red_branch, blue_branch, match_id, status } = sch;
|
|
|
+
|
|
|
+ if (status !== '2') return;
|
|
|
if (!red_branch || !blue_branch) return;
|
|
|
|
|
|
|
|
|
const winProp = [];
|
|
|
- const propList = ['id', 'name', 'logo', 'members'];
|
|
|
+ const propList = [ 'id', 'name', 'logo', 'members' ];
|
|
|
const winTeam = this.getWinTeam(sch);
|
|
|
for (const p of propList) {
|
|
|
winProp.push({ key: p, value: sch[`${winTeam}_${p}`] });
|
|
@@ -85,7 +87,7 @@ class ScheduleService extends CrudService {
|
|
|
|
|
|
const nmRed_id = _.get(nextMatch, 'red_id');
|
|
|
const winTeamId = _.get(
|
|
|
- winProp.find((f) => f.key === 'id'),
|
|
|
+ winProp.find(f => f.key === 'id'),
|
|
|
'value'
|
|
|
);
|
|
|
if (nmRed_id === winTeamId) return;
|