Skip to content

Commit

Permalink
Fix alliance fetching, and handle if the id is null, which can happen…
Browse files Browse the repository at this point in the history
… in rare circumstances
  • Loading branch information
karbowiak committed Oct 6, 2024
1 parent 890027f commit 4de5f52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Jobs/UpdateAlliance.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function __construct(
public function handle(array $data): void
{
$allianceId = $data["alliance_id"];
if ($allianceId === 0) {
if ($allianceId === 0 || $allianceId === null) {
return;
}

$allianceData = $this->esiData->getAllianceInfo($allianceId, $updateHistory);
$allianceData = $this->esiData->getAllianceInfo($allianceId);

$this->updateMeilisearch->enqueue([
'id' => $allianceId,
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/UpdateCharacter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function handle(array $data): void
{
$characterId = $data["character_id"];
$updateHistory = $data["update_history"] ?? false;
if ($characterId === 0) {
if ($characterId === 0 || $characterId === null) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/UpdateCorporation.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function handle(array $data): void
{
$corporationId = $data["corporation_id"];
$updateHistory = $data["update_history"] ?? false;
if ($corporationId === 0) {
if ($corporationId === 0 || $corporationId === null) {
return;
}

Expand Down

0 comments on commit 4de5f52

Please sign in to comment.