From b2925ef2579050c484a552f2cd9c0ffed11fb1e9 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 15 Oct 2022 20:05:32 +0300 Subject: Bug fixes & started setup.sh --- dbparse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dbparse.js') diff --git a/dbparse.js b/dbparse.js index dde0ff5..29b9cb7 100644 --- a/dbparse.js +++ b/dbparse.js @@ -129,7 +129,7 @@ async function writeShift(weekday, shiftId, shiftLine, courseLine, DB) className = null; dbOperations.push(DB.execute( - `INSERT INTO shifts VALUES (${weekday}, ${shiftId}, ?, ?, ?)`, + `INSERT IGNORE INTO shifts VALUES (${weekday}, ${shiftId}, ?, ?, ?)`, [courseName, teacherName, className] )); } @@ -195,4 +195,4 @@ exports.build = writeShifts; exports.get = getShift; exports.randomIndex = getRandomIndex; exports.find = findExpression; -exports.getNextChar = getNextChar; \ No newline at end of file +exports.getNextChar = getNextChar; -- cgit v1.2.3