Fix lookups for empty contest sessions

This commit is contained in:
phl0
2023-11-09 15:11:36 +01:00
parent 19f01dd393
commit 83b3261034
2 changed files with 2 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ class Contesting extends CI_Controller {
$result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest);
header('Content-Type: application/json');
if ($result->num_rows()) {
if ($result && $result->num_rows()) {
echo json_encode(array('message' => 'Worked before'));
}
return;