Fix #706 Correct null ComponentGroup check for Atom and RSS feeds

This commit is contained in:
Luc Didry
2015-06-12 09:41:18 +02:00
parent 832db53ef2
commit 866d73e8f8
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class AtomController extends AbstractController
$feed->setDateFormat('datetime');
if ($group) {
if ($group->exists) {
$group->components->map(function ($component) use ($feed) {
$component->incidents()->orderBy('created_at', 'desc')->get()->map(function ($incident) use ($feed) {
$this->feedAddItem($feed, $incident);

View File

@@ -34,7 +34,7 @@ class RssController extends AbstractController
$feed->setDateFormat('datetime');
if ($group) {
if ($group->exists) {
$group->components->map(function ($component) use ($feed) {
$component->incidents()->orderBy('created_at', 'desc')->get()->map(function ($incident) use ($feed) {
$this->feedAddItem($feed, $incident);