Visual Console Refactor: error fixes

Former-commit-id: ff383a266f4bfd4c5c97ee8a7e067e35d0779d96
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-09 16:06:59 +02:00
parent c57b2b7611
commit ed0857efad
1 changed files with 9 additions and 2 deletions

View File

@ -376,7 +376,7 @@ class Item extends Model
private static function extractAgentId(array $data)
{
return static::parseIntOr(
static::issetInArray($data, ['agentId', 'id_agente']),
static::issetInArray($data, ['agentId', 'id_agent', 'id_agente']),
null
);
}
@ -392,7 +392,14 @@ class Item extends Model
private static function extractModuleId(array $data)
{
return static::parseIntOr(
static::issetInArray($data, ['moduleId', 'id_agente_modulo']),
static::issetInArray(
$data,
[
'moduleId',
'id_agente_modulo',
'id_modulo',
]
),
null
);
}