Skip to content

Commit 5744944

Browse files
authored
Merge pull request #7139 from nextcloud/fix/6739
fix: Use getId() method for card ID retrieval
2 parents 90f1019 + 1c1e3e9 commit 5744944

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/Controller/CardController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ public function create($title, $stackId, $type = 'plain', $order = 999, string $
6565
$card = $this->cardService->create($title, $stackId, $type, $order, $this->userId, $description, $duedate);
6666

6767
foreach ($labels as $label) {
68-
$this->assignLabel($card->id, $label);
68+
$this->assignLabel($card->getId(), $label);
6969
}
7070

7171
foreach ($users as $user) {
72-
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']);
72+
$this->assignmentService->assignUser($card->getId(), $user['id'], $user['type']);
7373
}
7474

7575
return $card;

src/views/CreateNewCardCustomPicker.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,11 @@ export default {
276276
}
277277
},
278278
onSelectLabel(label) {
279+
if (!label.id) return
279280
this.card.labels.push(label)
280281
},
281282
onRemoveLabel(removedLabel) {
282-
this.card.labels = this.card.label.filter(label => label.id !== removedLabel.id)
283+
this.card.labels = this.card.labels.filter(label => label.id !== removedLabel.id)
283284
},
284285
onSelectUser(user) {
285286
this.card.assignedUsers.push(user)

0 commit comments

Comments
 (0)