event may have changed (have endtime set) between load and saving Archived bit. Lock the event which now also reloads it.
This commit is contained in:
parent
500ced2dc5
commit
672de6e84f
|
@ -47,9 +47,12 @@ if ( $action == 'create' ) {
|
|||
$monitor = new ZM\Monitor($monitor_id);
|
||||
$monitor->TriggerOff();
|
||||
}
|
||||
$dbConn->beginTransaction();
|
||||
foreach ( $snapshot->Events() as $event ) {
|
||||
$event->lock();
|
||||
$event->save(array('Archived'=>1));
|
||||
}
|
||||
$dbConn->commit();
|
||||
$redirect = '?view=snapshot&id='.$snapshot->Id();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue