mirror of
https://github.com/documize/community.git
synced 2025-07-20 21:59:42 +02:00
i18n fixes
This commit is contained in:
parent
e56263564c
commit
6c8b10753d
11 changed files with 18 additions and 17 deletions
|
@ -66,6 +66,8 @@ func FilterCategoryProtected(docs []doc.Document, cats []category.Category, memb
|
|||
|
||||
// CopyDocument clones an existing document
|
||||
func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (newDocumentID string, err error) {
|
||||
unseq := doc.Unsequenced
|
||||
|
||||
doc, err := s.Document.Get(ctx, documentID)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "unable to fetch existing document")
|
||||
|
@ -79,6 +81,7 @@ func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (
|
|||
doc.VersionID = ""
|
||||
doc.GroupID = ""
|
||||
doc.Template = false
|
||||
doc.Sequence = unseq
|
||||
|
||||
// Duplicate pages and associated meta
|
||||
pages, err := s.Page.GetPages(ctx, documentID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue