Fix pushing new build tasks

This commit is contained in:
Anton Vakhrushev 2020-04-20 22:30:44 +03:00
parent 58b65aff82
commit 87d13eacb6

View File

@ -199,7 +199,7 @@ function calculateInsertTime(tasks: ImmutableTaskList, name: string, args: Args,
if (villageId && !insertedTs) { if (villageId && !insertedTs) {
for (let taskTypePred of TASK_TYPE_PREDICATES) { for (let taskTypePred of TASK_TYPE_PREDICATES) {
const sameVillageAndTypePred = t => sameVillage(villageId, t.args) && taskTypePred(t.name); const sameVillageAndTypePred = t => sameVillage(villageId, t.args) && taskTypePred(name);
insertedTs = lastTaskTime(tasks, sameVillageAndTypePred); insertedTs = lastTaskTime(tasks, sameVillageAndTypePred);
if (insertedTs) { if (insertedTs) {
insertedTs += 1; insertedTs += 1;