Only apply decisions to departments the notice covers

This commit is contained in:
2025-10-23 15:22:45 -04:00
parent e1f1093d84
commit a403832735

View File

@@ -91,8 +91,10 @@ export async function onRequestPost(context: RequestContext) {
requestedNotice.decisions,
);
for (const department of userAdminDepartments)
for (const department of userAdminDepartments) {
if (!JSON.parse(requestedNotice.departments).includes(department)) continue;
decisions[department] = accepted;
}
const applicableDepartments = JSON.parse(requestedNotice.departments).length;