Skip to content

Commit

Permalink
[TM-1400] Fix a couple places that missed the org property name update.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Nov 26, 2024
1 parent 6f66d69 commit 5909214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/Exports/V2/OrganisationsExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ private function addFileCollectionHeadings(array $headings): array
private function buildTreeSpecies(Organisation $organisation): string
{
$list = [];
$treeSpecies = $organisation->treeSpecies()->select('name', 'amount')->get();
foreach ($treeSpecies as $treeSpecies) {
$list[] = $treeSpecies->name . '(' . $treeSpecies->amount . ')';
$treeSpecies = $organisation->treeSpeciesHistorical()->select('name', 'amount')->get();
foreach ($treeSpecies as $instance) {
$list[] = $instance->name . '(' . $instance->amount . ')';
}

return '[ ' . implode(',', $list) . ' ]';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function toArray($request)
'founding_date' => $this->founding_date,
'description' => $this->description,

'tree_species' => TreeSpeciesResource::collection($this->treeSpecies),
'tree_species' => TreeSpeciesResource::collection($this->treeSpeciesHistorical),

'web_url' => $this->web_url,
'facebook_url' => $this->facebook_url,
Expand Down

0 comments on commit 5909214

Please sign in to comment.