Skip to content

Commit

Permalink
fix: get envs before sortby
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Jun 24, 2024
1 parent e5d915a commit 97aa613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 97aa613

Please sign in to comment.