Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix

Andras Bacsai7456fc1ac70c
diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php
index 732157ccc1..2406c25a0a 100644
--- a/app/Models/PrivateKey.php
+++ b/app/Models/PrivateKey.php
@@ -14,10 +14,12 @@ class PrivateKey extends BaseModel
protected $hidden = [
'private_key',
];
- static public function ownedByCurrentTeam()
+ static public function ownedByCurrentTeam(array $select = ['*'])
{
- return PrivateKey::whereTeamId(session('currentTeam')->id);
+ $selectArray = collect($select)->concat(['id']);
+ return PrivateKey::whereTeamId(session('currentTeam')->id)->where('id', '>', 0)->select($selectArray->all());
}
+
public function servers()
{
return $this->hasMany(Server::class);