LP#1849212: (follow-up) fix adding an item to a course with alt call number
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 15 Sep 2020 01:15:03 +0000 (21:15 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 15 Sep 2020 01:15:03 +0000 (21:15 -0400)
open-ils.cat.call_number.find_or_create expects an integer to identify
the owning library, not a fieldmapper object.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/share/course.service.ts

index 4cca3ef..080626b 100644 (file)
@@ -221,7 +221,7 @@ export class CourseService {
             this.pcrud.update(item).subscribe(() => {
                 if (updatingVolume) {
                     const cn = item.call_number();
-                    const callNumberLibrary = this.org.canHaveVolumes(courseLib) ? courseLib : cn.owning_lib();
+                    const callNumberLibrary = this.org.canHaveVolumes(courseLib) ? courseLib.id() : cn.owning_lib();
                     return this.net.request(
                         'open-ils.cat', 'open-ils.cat.call_number.find_or_create',
                         this.auth.token(), callNumber, cn.record(),