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

[WIP] Backup process outline

This commit is contained in:
sauls8t 2018-10-10 15:13:09 +01:00
parent 8bbb0d3e82
commit 4094677792
18 changed files with 678 additions and 220 deletions

View file

@ -409,6 +409,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) {
// Clone categories.
cats, err := h.Store.Category.GetDocumentCategoryMembership(ctx, templateID)
if err != nil && err != sql.ErrNoRows {
ctx.Transaction.Rollback()
response.WriteServerError(w, method, err)
h.Runtime.Log.Error(method, err)
return
@ -422,6 +423,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) {
cc.SpaceID = d.SpaceID
err = h.Store.Category.AssociateDocument(ctx, cc)
if err != nil && err != sql.ErrNoRows {
ctx.Transaction.Rollback()
response.WriteServerError(w, method, err)
h.Runtime.Log.Error(method, err)
return