diff --git a/app/module/attendance/manager/AttendanceManager.php b/app/module/attendance/manager/AttendanceManager.php index 0e81e076..8b88265a 100644 --- a/app/module/attendance/manager/AttendanceManager.php +++ b/app/module/attendance/manager/AttendanceManager.php @@ -301,9 +301,9 @@ public function create(array $data, ?int $resourceId = null): Attendance $this->responder->E4005_OBJECT_NOT_FOUND(Event::MODULE, $data["eventId"]); } - $existingAttendance = $this->getByEventUserId($data["eventId"], $data["userId"]); - $this->allowCreate($data); //allowCreate checks right for both creating and updating already created attendance + + $existingAttendance = $this->getByEventUserId($data["eventId"], $data["userId"]); if (!$existingAttendance instanceof Attendance) { $created = $this->createByArray($data); if ($created && isset($data["preStatusId"])) {