LP#1929749: tweak applying upload template
authorGalen Charlton <gmc@equinoxOLI.org>
Thu, 13 Jan 2022 21:43:00 +0000 (16:43 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 13 Jan 2022 21:43:00 +0000 (16:43 -0500)
When in fetch import parameters mode, don't try to
apply the provider or fiscal year from the template.

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

index 0f6ba13..b35b886 100644 (file)
@@ -594,8 +594,12 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy {
 
         this.bibSourceSelector.applyEntryId(this.selectedBibSource);
         this.matchSetSelector.applyEntryId(this.selectedMatchSet);
-        this.providerSelector.selectedId = this.selectedProvider;
-        this.fiscalYearSelector.applyEntryId(this.selectedFiscalYear);
+        if (this.providerSelector) {
+            this.providerSelector.selectedId = this.selectedProvider;
+        }
+        if (this.fiscalYearSelector) {
+           this.fiscalYearSelector.applyEntryId(this.selectedFiscalYear);
+        }
         this.mergeProfileSelector.applyEntryId(this.selectedMergeProfile);
         this.fallThruMergeProfileSelector.applyEntryId(this.selectedFallThruMergeProfile);
     }