Skip to content

Commit

Permalink
IcingaObjectMultiRelations: Set property modified to false when loa…
Browse files Browse the repository at this point in the history
…ded from DB
  • Loading branch information
raviks789 committed Aug 13, 2024
1 parent 428a49f commit 6616343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/Director/Objects/IcingaObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public function getMultiRelation($property)
public function setMultiRelation($property, $values)
{
$this->getMultiRelation($property)->set($values);

return $this;
}

Expand Down
2 changes: 2 additions & 0 deletions library/Director/Objects/IcingaObjectMultiRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ public function setBeingLoadedFromDb()
foreach ($this->relations as $k => $v) {
$this->stored[$k] = clone($v);
}

$this->modified = false;
}

protected function getRelatedClassName()
Expand Down

0 comments on commit 6616343

Please sign in to comment.