Skip to content

Commit

Permalink
#9253 Fix error when adding announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWr authored and asmecher committed Nov 8, 2023
1 parent b8d1f68 commit 9fa7d30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/v1/announcements/PKPAnnouncementHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ public function add($slimRequest, $response, $args)
}

$announcement = Repo::announcement()->newDataObject($params);
$announcementId = Repo::announcement()->add($announcement);

try {
$announcement = Repo::announcement()->add($announcementId);
$announcementId = Repo::announcement()->add($announcement);
} catch (StoryTemporaryFileException $e) {
$announcement = Repo::announcement()->get($announcementId);
Repo::announcement()->delete($announcement);
Expand Down

0 comments on commit 9fa7d30

Please sign in to comment.