From 135d1e0f16f2fee2c3674a050d5eb1e2ca731248 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 26 Feb 2020 17:09:21 +0100 Subject: [PATCH] fix set contact if multi pj --- .../attachment-create/attachment-create.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/app/attachments/attachment-create/attachment-create.component.ts b/src/frontend/app/attachments/attachment-create/attachment-create.component.ts index 79eb839a2f4..e5029e56609 100644 --- a/src/frontend/app/attachments/attachment-create/attachment-create.component.ts +++ b/src/frontend/app/attachments/attachment-create/attachment-create.component.ts @@ -110,12 +110,12 @@ export class AttachmentCreateComponent implements OnInit { if (data.categoryId === 'outgoing') { if (!this.functions.empty(data.recipients) && data.recipients.length > 0) { await this.getContacts(data.recipients); - contact = !this.functions.empty(data.recipients) ? [{ id: data.recipients[0].id, type: data.recipients[0].type }] : ''; + contact = !this.functions.empty(data.recipients) ? [{ id: this.resourceContacts[0].id, type: this.resourceContacts[0].type }] : ''; } } else { if (!this.functions.empty(data.senders) && data.senders.length > 0) { await this.getContacts(data.senders); - contact = !this.functions.empty(data.senders) ? [{ id: data.senders[0].id, type: data.senders[0].type }] : ''; + contact = !this.functions.empty(data.senders) ? [{ id: this.resourceContacts[0].id, type: this.resourceContacts[0].type }] : ''; } } -- GitLab