Fix #37675 API Post eventattendee sets ref to same as id (#38274)

* Fix #37675 API Post eventattendee sets ref to same as id

* Move empty ref check after fetch #38274

---------

Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
This commit is contained in:
Jon Bendtsen 2026-05-18 12:07:50 +02:00 committed by GitHub
parent 1b94023550
commit 40b4e8744f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,7 +301,7 @@ class ConferenceOrBoothAttendee extends CommonObject
$result = $this->createCommon($user, $notrigger);
if ($result > 0) {
$result = $this->fetch($result);
if ($result > 0) {
if ($result > 0 && empty($this->ref)) {
$this->ref = (string) $this->id;
$result = $this->update($user);
}