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
|
// Get the oldest approved article that hasn't been published yet
|
||||||
$article = Article::where('approval_status', 'approved')
|
$article = Article::where('approval_status', 'approved')
|
||||||
->whereNotNull('validated_at')
|
|
||||||
->whereDoesntHave('articlePublication')
|
->whereDoesntHave('articlePublication')
|
||||||
->oldest('validated_at')
|
->oldest('created_at')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (! $article) {
|
if (! $article) {
|
||||||
|
|
@ -45,7 +44,7 @@ public function handle(): void
|
||||||
'article_id' => $article->id,
|
'article_id' => $article->id,
|
||||||
'title' => $article->title,
|
'title' => $article->title,
|
||||||
'url' => $article->url,
|
'url' => $article->url,
|
||||||
'validated_at' => $article->validated_at
|
'created_at' => $article->created_at
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Fetch article data
|
// Fetch article data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue