Skip to content

Commit ea0ca13

Browse files
authored
fix entity summit id reference on deletion (#142)
Signed-off-by: romanetar <roman_ag@hotmail.com>
1 parent 84f8705 commit ea0ca13

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/Models/Foundation/Summit/SummitOwned.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ public function hasSummit():bool{
6666
public $former_summit_id = 0;
6767

6868
public function clearSummit():void{
69-
$this->former_summit_id = is_null($this->summit) ? $this->summit->getId() : 0;
69+
if ($this->former_summit_id == 0) {
70+
$this->former_summit_id = is_null($this->summit) ? 0 : $this->summit->getId();
71+
}
7072
$this->summit = null;
7173
}
7274
}

0 commit comments

Comments
 (0)