This commit is contained in:
kolaente 2018-10-05 19:17:39 +02:00
parent 3819927dd2
commit 53a7f2e6a7
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -48,18 +48,7 @@ func GetNamespaceByID(id int64) (namespace Namespace, err error) {
// ReadOne gets one namespace
func (n *Namespace) ReadOne() (err error) {
getN := Namespace{}
exists, err := x.ID(n.ID).Get(&getN)
if err != nil {
return
}
if !exists {
return ErrNamespaceDoesNotExist{ID: n.ID}
}
*n = getN
*n, err = GetNamespaceByID(n.ID)
return
}