Fixed getting lists by namespace

This commit is contained in:
kolaente 2019-04-02 10:53:16 +02:00
parent 87873e53c5
commit 2d9d27f63c
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -85,6 +85,7 @@ func getNamespace(c echo.Context) (namespace models.Namespace, err error) {
if err != nil {
return
}
namespace.ID = namespaceID
canRead, err := namespace.CanRead(user)
if err != nil {
return namespace, err
@ -94,10 +95,6 @@ func getNamespace(c echo.Context) (namespace models.Namespace, err error) {
}
// Get the namespace
namespace, err = models.GetNamespaceByID(namespaceID)
if err != nil {
return
}
err = namespace.ReadOne()
return
}