Update api_agendaevents.class.php

This commit is contained in:
Frédéric FRANCE 2021-03-08 00:23:05 +01:00 committed by GitHub
parent e5d8267786
commit c0c9ac439f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class AgendaEvents extends DolibarrApi
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read) { if (!DolibarrApiAccess::$user->rights->agenda->myactions->read) {
throw new RestException(401, "Insufficient rights to read an event"); throw new RestException(401, "Insufficient rights to read an event");
} }
if ($id == 0) { if ($id === 0) {
$result = $this->actioncomm->initAsSpecimen(); $result = $this->actioncomm->initAsSpecimen();
} else { } else {
$result = $this->actioncomm->fetch($id); $result = $this->actioncomm->fetch($id);