mirror of
https://github.com/documize/community.git
synced 2025-07-21 06:09:42 +02:00
clone space!
This commit is contained in:
parent
866b4eba8a
commit
bf390ed0b9
18 changed files with 302 additions and 108 deletions
|
@ -12,6 +12,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
|
@ -199,6 +200,11 @@ func (s Scope) TemplatesBySpace(ctx domain.RequestContext, spaceID string) (docu
|
|||
ctx.OrgID,
|
||||
ctx.UserID)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
err = nil
|
||||
documents = []doc.Document{}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "select space document templates")
|
||||
return
|
||||
|
@ -241,6 +247,11 @@ func (s Scope) DocumentList(ctx domain.RequestContext) (documents []doc.Document
|
|||
ctx.OrgID,
|
||||
ctx.UserID)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
err = nil
|
||||
documents = []doc.Document{}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "select documents list")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue