Bugfix: when namespace destruction causes a database error, return the

error, not nil.
This commit is contained in:
Ward Vandewege 2021-10-16 11:14:37 -04:00
parent a9a1a8fb3c
commit 306a80cf57

View File

@ -59,7 +59,7 @@ func (h *Headscale) DestroyNamespace(name string) error {
}
if result := h.db.Unscoped().Delete(&n); result.Error != nil {
return err
return result.Error
}
return nil