N°9248 - REST API - Updating a link creates an empty caselog on the linked object when there is no change

This commit is contained in:
Anne-Cath
2026-02-27 11:21:32 +01:00
parent fc967c06ce
commit d54e71f0f9

View File

@@ -179,7 +179,7 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator
assert($oLink instanceof $this->sClass);
$iObjectId = $oLink->GetKey();
if (array_key_exists($iObjectId, $this->aPreserved)) {
if (array_key_exists($iObjectId, $this->aPreserved) && !$oLink->Equals(MetaModel::GetObject(get_class($oLink), $iObjectId, true))) {
unset($this->aPreserved[$iObjectId]);
$this->aModified[$iObjectId] = $oLink;
$this->bHasDelta = true;