Only send notifications on new news by default
This commit is contained in:
parent
3c0cbe55b6
commit
b229d697a3
|
@ -39,7 +39,7 @@ class NewsController extends BaseController
|
|||
$news = $this->news->find($newsId);
|
||||
$isMeeting = (bool) $request->get('meeting', false);
|
||||
|
||||
return $this->showEdit($news, true, $isMeeting);
|
||||
return $this->showEdit($news, !$news, $isMeeting);
|
||||
}
|
||||
|
||||
protected function showEdit(?News $news, bool $sendNotification = true, bool $isMeetingDefault = false): Response
|
||||
|
|
|
@ -44,7 +44,7 @@ class NewsControllerTest extends ControllerTest
|
|||
$this->assertEquals('pages/news/edit.twig', $view);
|
||||
|
||||
$this->assertNotEmpty($data['news']);
|
||||
$this->assertTrue($data['send_notification']);
|
||||
$this->assertFalse($data['send_notification']);
|
||||
|
||||
return $this->response;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue