Merge pull request #7145 from nextcloud/backport/7139/stable30

[stable30] fix:  Use getId() method for card ID retrieval
This commit is contained in:
grnd-alt
2025-07-29 11:14:53 +02:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -64,11 +64,11 @@ class CardController extends Controller {
$card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate); $card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
foreach ($labels as $label) { foreach ($labels as $label) {
$this->assignLabel($card->id, $label); $this->assignLabel($card->getId(), $label);
} }
foreach ($users as $user) { foreach ($users as $user) {
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']); $this->assignmentService->assignUser($card->getId(), $user['id'], $user['type']);
} }
return $card; return $card;

View File

@@ -276,10 +276,11 @@ export default {
} }
}, },
onSelectLabel(label) { onSelectLabel(label) {
if (!label.id) return
this.card.labels.push(label) this.card.labels.push(label)
}, },
onRemoveLabel(removedLabel) { onRemoveLabel(removedLabel) {
this.card.labels = this.card.label.filter(label => label.id !== removedLabel.id) this.card.labels = this.card.labels.filter(label => label.id !== removedLabel.id)
}, },
onSelectUser(user) { onSelectUser(user) {
this.card.assignedUsers.push(user) this.card.assignedUsers.push(user)