diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php index 48273a9f8..065746ede 100644 --- a/app/Models/PrivateKey.php +++ b/app/Models/PrivateKey.php @@ -229,7 +229,7 @@ class PrivateKey extends BaseModel public static function cleanupUnusedKeys() { - self::all()->each(function ($privateKey) { + self::ownedByCurrentTeam()->each(function ($privateKey) { $privateKey->safeDelete(); }); }