LP1849212: improve fleshing in course service
authorJane Sandberg <sandbej@linnbenton.edu>
Tue, 1 Sep 2020 16:19:35 +0000 (09:19 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 Sep 2020 22:17:35 +0000 (18:17 -0400)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/share/course.service.ts

index 7443a79..c3e480d 100644 (file)
@@ -28,14 +28,15 @@ export class CourseService {
         });
     }
     getCourses(course_ids?: Number[]): Promise<IdlObject[]> {
+        const flesher = {flesh: 2, flesh_fields: {
+            'acmc': ['owning_lib'],
+            'aou': ['ou_type']}};
         if (!course_ids) {
             return this.pcrud.retrieveAll('acmc',
-                {flesh: 1, flesh_fields: {'acmc': ['owning_lib']}},
-                {atomic: true}).toPromise();
+                flesher, {atomic: true}).toPromise();
         } else {
             return this.pcrud.search('acmc', {id: course_ids},
-                {flesh: 1, flesh_fields: {'acmc': ['owning_lib']}},
-                {atomic: true}).toPromise();
+                flesher, {atomic: true}).toPromise();
         }
     }