Fix scheduling errors
This commit is contained in:
parent
f11d12dab3
commit
be851be039
1 changed files with 2 additions and 3 deletions
|
|
@ -32,9 +32,8 @@ public function handle(): void
|
|||
{
|
||||
// Get the oldest approved article that hasn't been published yet
|
||||
$article = Article::where('approval_status', 'approved')
|
||||
->whereNotNull('validated_at')
|
||||
->whereDoesntHave('articlePublication')
|
||||
->oldest('validated_at')
|
||||
->oldest('created_at')
|
||||
->first();
|
||||
|
||||
if (! $article) {
|
||||
|
|
@ -45,7 +44,7 @@ public function handle(): void
|
|||
'article_id' => $article->id,
|
||||
'title' => $article->title,
|
||||
'url' => $article->url,
|
||||
'validated_at' => $article->validated_at
|
||||
'created_at' => $article->created_at
|
||||
]);
|
||||
|
||||
// Fetch article data
|
||||
|
|
|
|||
Loading…
Reference in a new issue