Skip to content

Commit

Permalink
[FINNA-1482] SierraApi: Move fields to harvest into a member variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Dec 18, 2023
1 parent 0a7a4a1 commit 407969b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/RecordManager/Base/Harvest/SierraApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ class SierraApi extends AbstractBase
'timeout' => 600,
];

/**
* Fields to request from Sierra
*
* @var string
*/
protected $harvestFields = 'id,deleted,locations,fixedFields,varFields';

/**
* Initialize harvesting
*
Expand Down Expand Up @@ -177,7 +184,7 @@ public function harvest($callback)
$apiParams = [
'limit' => $this->batchSize,
'offset' => $this->startPosition,
'fields' => 'id,deleted,locations,fixedFields,varFields',
'fields' => $this->harvestFields,
];
if (null !== $this->suppressedRecords) {
$apiParams['suppressed'] = $this->suppressedRecords ? 'true' : 'false';
Expand Down

0 comments on commit 407969b

Please sign in to comment.