fix comparison of IDs when prepping args for picklist merge
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 10 Feb 2020 16:18:45 +0000 (11:18 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 10 Feb 2020 16:18:45 +0000 (11:18 -0500)
The API expects the lead to _not_ be on the list of IDs of
lists to merge into the lead.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/acq/search/picklist-merge-dialog.component.ts

index a7d7643..dca24cf 100644 (file)
@@ -48,7 +48,7 @@ export class PicklistMergeDialogComponent
       'open-ils.acq',
       'open-ils.acq.picklist.merge',
       this.auth.token(), this.leadList,
-      this.selectedLists.map( list => list.id() ).filter(function(p) { return p !== that.leadList; })
+      this.selectedLists.map( list => list.id() ).filter(function(p) { return Number(p) !== Number(that.leadList); })
     ).subscribe(
       (res) => {
         if (this.evt.parse(res)) {