mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Preload the namespace
This commit is contained in:
parent
3110dd1575
commit
9ce8dc3fb6
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ func (h *Headscale) checkKeyValidity(k string) (*PreAuthKey, error) {
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
pak := PreAuthKey{}
|
pak := PreAuthKey{}
|
||||||
if db.First(&pak, "key = ?", k).RecordNotFound() {
|
if db.Preload("Namespace").First(&pak, "key = ?", k).RecordNotFound() {
|
||||||
return nil, errorAuthKeyNotFound
|
return nil, errorAuthKeyNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue