Merge #20070 - Fix #20065 - event creation when server drops past event

Pull-request: #20070
Fixes: #20065
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2026-02-05 13:23:05 +01:00
commit f2572c4228
No known key found for this signature in database
GPG Key ID: 70684F4717D49A31

View File

@ -174,6 +174,16 @@ class Events
if ($this->response->isAjax()) {
if ($message->isSuccess()) {
$events = $this->dbi->getEvents($db, $_POST['item_name']);
if ($events === []) {
$this->response->setRequestStatus(false);
$this->response->addJSON(
'message',
__('The event was dropped immediately after creation.')
);
$this->response->addJSON('tableType', 'events');
exit;
}
$event = $events[0];
$this->response->addJSON(
'name',