LP1993922: Course material delete should not delete other courses' materials
authorJane Sandberg <js7389@princeton.edu>
Sat, 22 Oct 2022 22:43:10 +0000 (15:43 -0700)
committerMichele Morgan <mmorgan@noblenet.org>
Mon, 24 Oct 2022 20:55:56 +0000 (16:55 -0400)
To test:
* Apply this patch
* Login to BR1 workstation
* Go to Admin - Local Admin - Course Reserves List
* Create two courses, Course 1 and Course 2
* Associate materials to both courses
* Archive Course 1
* Go to Course materials on Course 2 and note that
it still has all of its materials attached.

Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Beth Willis <willis@noblenet.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/eg2/src/app/staff/share/course.service.ts

index 12a0303..df1afc4 100644 (file)
@@ -171,7 +171,7 @@ export class CourseService {
                 course_library_hash[course.id()] = course.owning_lib();
             });
 
-            this.pcrud.retrieveAll('acmcm', {course: course_ids}).subscribe(material => {
+            this.pcrud.search('acmcm', {course: course_ids}).subscribe(material => {
                 deleteRequest$.push(this.net.request(
                   'open-ils.courses', 'open-ils.courses.detach_material',
                   this.auth.token(), material.id()));