fix ssh key migration broken with the new team check
This commit is contained in:
parent
0045c5b7f4
commit
2932d9a6e0
1 changed files with 8 additions and 3 deletions
|
|
@ -218,9 +218,14 @@ public static function generateFingerprint($privateKey)
|
|||
|
||||
private static function fingerprintExists($fingerprint, $excludeId = null)
|
||||
{
|
||||
return self::query()
|
||||
->where('fingerprint', $fingerprint)
|
||||
->where('team_id', currentTeam()->id)
|
||||
$query = self::query()
|
||||
->where('fingerprint', $fingerprint);
|
||||
|
||||
if (currentTeam()) {
|
||||
$query->where('team_id', currentTeam()->id);
|
||||
}
|
||||
|
||||
return $query
|
||||
->when($excludeId, fn ($query) => $query->where('id', '!=', $excludeId))
|
||||
->exists();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue