Skip to content

Commit

Permalink
Fixed bug when saving Ad Group w/o field layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lindseydiloreto committed May 29, 2024
1 parent b7224aa commit 8420866
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Added
- Added ability to [track views](https://plugins.doublesecretagency.com/ad-wizard/tracking-views/) via JavaScript. ([#50](https://github.com/doublesecretagency/craft-adwizard/pull/50), thanks @cballenar)

### Fixed
- Fixed bug encountered when saving an Ad Group without a field layout. ([#51](https://github.com/doublesecretagency/craft-adwizard/issues/51))

## 4.0.0 - 2024-02-22

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/AdGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function actionSaveGroup(): ?Response

// Get POST values
$group->id = $request->getBodyParam('groupId');
$group->fieldLayoutId = $request->getBodyParam('fieldLayoutId');
$group->fieldLayoutId = $request->getBodyParam('fieldLayoutId') ?: null;
$group->name = $request->getBodyParam('name');
$group->handle = $request->getBodyParam('handle');

Expand Down

0 comments on commit 8420866

Please sign in to comment.