Skip to content

Commit

Permalink
Merge pull request #100 from FdelMazo/subcomisiones
Browse files Browse the repository at this point in the history
Avoid pushing corrupted curso clases
  • Loading branch information
lopezac authored Mar 19, 2024
2 parents 0a5a49f + a0ebb64 commit c6cf74f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/siuparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function parseSIU(rawdata) {
const clases = [];
for (let claseLine of cursoMatch[3].trim().split("\n")) {
console.debug(`--- Found clase: ${claseLine}`)
if (claseLine.includes("Sin definir") || !claseLine.includes("\t")) {
if (!SEMANA.some(day => claseLine.includes(day))) {
continue;
}

Expand Down Expand Up @@ -99,5 +99,6 @@ export function parseSIU(rawdata) {
timestamp: Date.now(),
});
}
console.debug(result);
return result;
}

0 comments on commit c6cf74f

Please sign in to comment.