Skip to content

Commit

Permalink
Update TrelloJsonService.php
Browse files Browse the repository at this point in the history
Fixes the following issue: nextcloud#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 and juliusknorr committed May 9, 2024
1 parent 774849c commit c2425f3
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 @@ -116,7 +116,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 @@ -344,7 +344,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 c2425f3

Please sign in to comment.