fix: get envs before sortby
This commit is contained in:
parent
e5d915a7a9
commit
97aa6139ea
@ -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 New Issue
Block a user