Skip to content

Commit

Permalink
Fix an error when saving a new site
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jul 10, 2024
1 parent 774157a commit 20207f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/VoucherTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public function afterSaveSiteHandler(SiteEvent $event): void
{
$projectConfig = Craft::$app->getProjectConfig();

if ($event->isNew) {
if ($event->isNew && isset($event->oldPrimarySiteId)) {
$oldPrimarySiteUid = Db::uidById(Table::SITES, $event->oldPrimarySiteId);
$existingVoucherTypeSettings = $projectConfig->get(self::CONFIG_VOUCHERTYPES_KEY);

Expand Down

0 comments on commit 20207f4

Please sign in to comment.