fix: get envs before sortby
This commit is contained in:
parent
e5d915a7a9
commit
97aa6139ea
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ public function default_environment()
|
|||
{
|
||||
$default = $this->environments()->where('name', 'production')->first();
|
||||
if (! $default) {
|
||||
$default = $this->environments()->sortBy('created_at')->first();
|
||||
$default = $this->environments()->get()->sortBy('created_at')->first();
|
||||
}
|
||||
|
||||
return $default;
|
||||
|
|
|
|||
Loading…
Reference in a new issue