Merge pull request #3432 from CachetHQ/hotfix/duplicate-order-statement

Remove duplicate order statement
This commit is contained in:
James Brooks
2019-01-27 22:22:00 +00:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ class ComponentsComposer
public function compose(View $view)
{
$componentGroups = $this->getVisibleGroupedComponents();
$ungroupedComponents = Component::ungrouped()->get();
$ungroupedComponents = Component::ungrouped()->orderBy('status', 'desc')->get();
$view->withComponentGroups($componentGroups)
->withUngroupedComponents($ungroupedComponents);

View File

@@ -256,7 +256,7 @@ class IncidentPresenter extends BasePresenter implements Arrayable
public function latest()
{
if (is_bool($this->latest)) {
$this->latest = $this->wrappedObject->updates()->orderBy('created_at', 'desc')->first();
$this->latest = $this->wrappedObject->updates()->first();
}
return $this->latest;