]> source.dussan.org Git - gitea.git/commit
Fix panic of ssh public key page after deletion of auth source (#31829) (#31836)
authorGiteabot <teabot@gitea.io>
Thu, 15 Aug 2024 17:50:57 +0000 (01:50 +0800)
committerGitHub <noreply@github.com>
Thu, 15 Aug 2024 17:50:57 +0000 (01:50 +0800)
commit5fa90ad9bc7fe800d657e909462e5e1caefc7193
tree55404955b343b6b52b86407e242515c26adc0ec9
parentb6ede69a1b2836621f54450df9ac10d05c3b0fa0
Fix panic of ssh public key page after deletion of auth source (#31829) (#31836)

Backport #31829 by @lunny

Fix #31730

This PR rewrote the function `PublicKeysAreExternallyManaged` with a
simple test. The new function removed the loop to make it more readable.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
models/asymkey/ssh_key.go
models/asymkey/ssh_key_test.go