Skip to content

Commit

Permalink
Update TrelloJsonService.php
Browse files Browse the repository at this point in the history
Fixes the following issue: #5136
By fixing the following error when running 'php occ deck:import --system=TrelloJson'

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:136

and 

Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:364


Signed-off-by: mulles <com.github@emu.lu>
  • Loading branch information
mulles authored May 7, 2024
1 parent 70cefdd commit 361b061
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/Importer/Systems/TrelloJsonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function (\stdClass $a) use ($trelloCard) {
$cardId = $this->cards[$trelloCard->id]->getId();
$comment = new Comment();
if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) {
$actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}->getUID();
$actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username};
} else {
$actor = $this->getImportService()->getConfig('owner')->getUID();
}
Expand Down Expand Up @@ -361,7 +361,7 @@ private function translateColor(?string $color): string {

private function replaceUsernames(string $text): string {
foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) {
$text = str_replace($trello, $nextcloud->getUID(), $text);
$text = str_replace($trello, $nextcloud, $text);
}
return $text;
}
Expand Down

0 comments on commit 361b061

Please sign in to comment.