From 4aff0ddec0908faeef5ed9a9ff56d85a9c0dce32 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 14 Jun 2018 07:31:22 +0100 Subject: [PATCH] Fix the component group status. Closes #2731 --- app/Models/ComponentGroup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/ComponentGroup.php b/app/Models/ComponentGroup.php index b9a3603d92b5..401e325ddbb9 100644 --- a/app/Models/ComponentGroup.php +++ b/app/Models/ComponentGroup.php @@ -99,7 +99,7 @@ class ComponentGroup extends Model implements HasPresenter */ public function components() { - return $this->hasMany(Component::class, 'group_id', 'id')->orderBy('order'); + return $this->hasMany(Component::class, 'group_id', 'id'); } /** @@ -119,7 +119,7 @@ public function incidents() */ public function enabled_components() { - return $this->components()->enabled(); + return $this->components()->enabled()->orderBy('order'); } /**