1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

Provide copy document option

Duplicates entire document tree into a new document (same space).
This commit is contained in:
sauls8t 2019-06-06 11:45:41 +01:00
parent b75969ae90
commit ec8d5c78e2
10 changed files with 304 additions and 12 deletions

View file

@ -76,13 +76,13 @@ func (s Store) GetDocumentOutboundLinks(ctx domain.RequestContext, documentID st
WHERE c_orgid=? AND c_sourcedocid=?`),
ctx.OrgID, documentID)
if err != nil && err != sql.ErrNoRows {
err = errors.Wrap(err, "select document oubound links")
return
}
if len(links) == 0 {
if err == sql.ErrNoRows || len(links) == 0 {
err = nil
links = []link.Link{}
}
if err != nil {
err = errors.Wrap(err, "select document oubound links")
}
return
}