From 0eab7f78ff6f9ace56a2cccc399cff2979d0da49 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 15 Nov 2024 21:22:11 +0100 Subject: [PATCH] version++ and fix private key saving --- app/Models/PrivateKey.php | 7 +++---- config/constants.php | 2 +- config/version.php | 2 +- versions.json | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/Models/PrivateKey.php b/app/Models/PrivateKey.php index fab1f1de7..80015d87f 100644 --- a/app/Models/PrivateKey.php +++ b/app/Models/PrivateKey.php @@ -219,15 +219,14 @@ class PrivateKey extends BaseModel private static function fingerprintExists($fingerprint, $excludeId = null) { $query = self::query() - ->where('fingerprint', $fingerprint); + ->where('fingerprint', $fingerprint) + ->where('id', '!=', $excludeId); if (currentTeam()) { $query->where('team_id', currentTeam()->id); } - return $query - ->when($excludeId, fn ($query) => $query->where('id', '!=', $excludeId)) - ->exists(); + return $query->exists(); } public static function cleanupUnusedKeys() diff --git a/config/constants.php b/config/constants.php index 364381cef..363cdd14f 100644 --- a/config/constants.php +++ b/config/constants.php @@ -2,7 +2,7 @@ return [ 'coolify' => [ - 'version' => '4.0.0-beta.369', + 'version' => '4.0.0-beta.370', 'self_hosted' => env('SELF_HOSTED', true), 'autoupdate' => env('AUTOUPDATE'), 'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'), diff --git a/config/version.php b/config/version.php index 00330af8b..64226ac05 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@