mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-03 22:42:38 +09:00
Bugfix: when namespace destruction causes a database error, return the
error, not nil.
This commit is contained in:
@@ -59,7 +59,7 @@ func (h *Headscale) DestroyNamespace(name string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if result := h.db.Unscoped().Delete(&n); result.Error != nil {
|
if result := h.db.Unscoped().Delete(&n); result.Error != nil {
|
||||||
return err
|
return result.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user