🐛 fix bug: wrong contact id returned by contact creation

This commit is contained in:
Marc Koch 2025-03-31 10:24:46 +02:00
parent 700ffab130
commit 8dab2377f5
Signed by: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -101,7 +101,7 @@ class MailingListRecipient {
} }
// Execute the query // Execute the query
$contact->execute(); $result = $contact->execute()->first();
} }
catch (\Exception $e) { catch (\Exception $e) {
throw new MailinglistException( throw new MailinglistException(
@ -112,7 +112,7 @@ class MailingListRecipient {
return new static( return new static(
sid: $sid, sid: $sid,
contact_id: $contact['id'], contact_id: $result['id'],
first_name: $firstName, first_name: $firstName,
last_name: $lastName, last_name: $lastName,
email: $email, email: $email,