Skip to content

Commit

Permalink
fix: failing test if is_open_access is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentauger committed Nov 28, 2024
1 parent d61b2d8 commit d2edb96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/PublicationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function store(Request $request): JsonResource
'is_open_access' => 'boolean',
]);

if ($validated['is_open_access']) {
if (isset($validated['is_open_access']) && $validated['is_open_access']) {
$validated['embargoed_until'] = null;
}

Expand Down Expand Up @@ -114,7 +114,7 @@ public function update(Request $request, Publication $publication): JsonResource
'is_open_access' => 'boolean',
]);

if ($validated['is_open_access']) {
if (isset($validated['is_open_access']) && $validated['is_open_access']) {
$validated['embargoed_until'] = null;
}

Expand Down

0 comments on commit d2edb96

Please sign in to comment.