mirror of
https://github.com/juanfont/headscale.git
synced 2025-03-13 23:12:54 -04:00
fix wrong condition
This commit is contained in:
parent
ed5498ef86
commit
d4d8ac5280
2
oidc.go
2
oidc.go
@ -287,7 +287,7 @@ func (h *Headscale) OIDCCallback(ctx *gin.Context) {
|
|||||||
log.Debug().Msg("Registering new machine after successful callback")
|
log.Debug().Msg("Registering new machine after successful callback")
|
||||||
|
|
||||||
namespace, err := h.GetNamespace(namespaceName)
|
namespace, err := h.GetNamespace(namespaceName)
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, errNamespaceNotFound) {
|
||||||
namespace, err = h.CreateNamespace(namespaceName)
|
namespace, err = h.CreateNamespace(namespaceName)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user