Skip to content

Commit

Permalink
slug active column should be true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 authored and ifox committed Oct 14, 2024
1 parent 5c6db93 commit c5f6afe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repositories/Behaviors/HandleSlugs.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function beforeSaveHandleSlugs(TwillModelContract $object, array $fields)
$currentSlug = [];
$currentSlug['slug'] = $fields['slug'][$locale];
$currentSlug['locale'] = $locale;
$currentSlug['active'] = $submittedLanguage['published'] ?? false;
$currentSlug['active'] = $submittedLanguage['published'] ?? true;
$currentSlug = $this->getSlugParameters($object, $fields, $currentSlug);
$object->twillSlugData[] = $currentSlug;
} else {
Expand All @@ -38,7 +38,7 @@ public function beforeSaveHandleSlugs(TwillModelContract $object, array $fields)
if (!empty(Arr::join($slugData, '-'))) {
$object->twillSlugData[] = [
'slug' => Str::slug(Arr::join($slugData, '-')),
'active' => $submittedLanguage['published'] ?? false,
'active' => $submittedLanguage['published'] ?? 1,
'locale' => $locale
];
}
Expand Down

0 comments on commit c5f6afe

Please sign in to comment.