Skip to content

Commit

Permalink
N°8139 - Fix ApplyStimulus during post update
Browse files Browse the repository at this point in the history
  • Loading branch information
eespie committed Feb 7, 2025
1 parent e93d909 commit a9bc497
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/dbobject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3862,7 +3862,9 @@ public function DBUpdate()
*/
protected function PostUpdateActions(array $aChanges): void
{
$this->FireEventAfterWrite($aChanges, false, $this->sStimulusBeingApplied);
$sStimulusBeingApplied = $this->sStimulusBeingApplied;
$this->sStimulusBeingApplied = null;
$this->FireEventAfterWrite($aChanges, false, $sStimulusBeingApplied);
$oKPI = new ExecutionKPI();
$this->AfterUpdate();
$oKPI->ComputeStatsForExtension($this, 'AfterUpdate');
Expand All @@ -3874,9 +3876,8 @@ protected function PostUpdateActions(array $aChanges): void
$this->ActivateOnObjectUpdateTriggersForTargetObjects();

$sClass = get_class($this);
if (utils::IsNotNullOrEmptyString($this->sStimulusBeingApplied))
if (utils::IsNotNullOrEmptyString($sStimulusBeingApplied))
{
$this->sStimulusBeingApplied = null;
$sStateAttCode = MetaModel::GetStateAttributeCode($sClass);
$sPreviousState = $this->m_aPreviousValuesForUpdatedAttributes[$sStateAttCode];
// Change state triggers...
Expand Down

0 comments on commit a9bc497

Please sign in to comment.