[FIX] ServicesController: entity_type (nis2_entity_type col non esiste) + WebhookService risk.status null-safe
This commit is contained in:
@@ -71,7 +71,7 @@ class ServicesController extends BaseController
|
||||
|
||||
// Cerca in DB
|
||||
$record = Database::fetchOne(
|
||||
'SELECT ak.*, o.name as org_name, o.nis2_entity_type, o.sector
|
||||
'SELECT ak.*, o.name as org_name, o.entity_type as nis2_entity_type, o.sector
|
||||
FROM api_keys ak
|
||||
JOIN organizations o ON o.id = ak.organization_id
|
||||
WHERE ak.key_hash = ? AND ak.is_active = 1
|
||||
@@ -888,14 +888,14 @@ class ServicesController extends BaseController
|
||||
);
|
||||
|
||||
$org = Database::fetchOne(
|
||||
'SELECT name, nis2_entity_type, sector, employee_count FROM organizations WHERE id = ?',
|
||||
'SELECT name, entity_type, sector, employee_count FROM organizations WHERE id = ?',
|
||||
[$orgId]
|
||||
);
|
||||
|
||||
$this->jsonSuccess([
|
||||
'organization' => [
|
||||
'name' => $org['name'],
|
||||
'entity_type' => $org['nis2_entity_type'],
|
||||
'entity_type' => $org['entity_type'],
|
||||
'sector' => $org['sector'],
|
||||
],
|
||||
'overall_score' => $overallScore,
|
||||
|
||||
Reference in New Issue
Block a user