diff --git a/package-lock.json b/package-lock.json index c4c1ac6819..dbfcf96989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpe-sws", - "version": "2.97.0", + "version": "2.97.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpe-sws", - "version": "2.97.0", + "version": "2.97.2", "license": "MIT", "dependencies": { "@emotion/react": "^11.11.1", diff --git a/src/features/schedules/PersonSelect.jsx b/src/features/schedules/PersonSelect.jsx index 53aad184a0..a2f65c3d5a 100644 --- a/src/features/schedules/PersonSelect.jsx +++ b/src/features/schedules/PersonSelect.jsx @@ -249,13 +249,13 @@ const PersonSelect = ({ useEffect(() => { setHasWarning(false); - if (selectedPerson !== null) { + if (selectedPerson !== null && edit) { const activeRecords = Schedules.history.filter( (record) => record.weekOf === currentWeek && record.studentID === selectedPerson.person_uid ); setHasWarning(activeRecords.length > 1); } - }, [assID, selectedPerson, currentWeek, refreshCurrent]); + }, [assID, selectedPerson, currentWeek, refreshCurrent, edit]); return (