diff --git a/app/Console/Commands/Nostr/PublishUnpublishedItems.php b/app/Console/Commands/Nostr/PublishUnpublishedItems.php index 77a1c975..7d56b693 100644 --- a/app/Console/Commands/Nostr/PublishUnpublishedItems.php +++ b/app/Console/Commands/Nostr/PublishUnpublishedItems.php @@ -37,6 +37,8 @@ class PublishUnpublishedItems extends Command ->when($modelName === 'LibraryItem', fn($q) => $q->where('type', '<>', 'markdown_article')) ->orderByDesc('created_at') ->first(); - $this->publishOnNostr($model, $this->getText($model)); + if ($model){ + $this->publishOnNostr($model, $this->getText($model)); + } } }