1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00

Change document activity records after space move

This commit is contained in:
McMatts 2018-04-05 20:00:42 +01:00
parent 19a916a4b4
commit 5fb41e9fb1
3 changed files with 23 additions and 0 deletions

View file

@ -221,6 +221,13 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request) {
if oldDoc.LabelID != d.LabelID {
h.Store.Category.RemoveDocumentCategories(ctx, d.RefID)
err = h.Store.Document.MoveActivity(ctx, documentID, oldDoc.LabelID, d.LabelID)
if err != nil {
ctx.Transaction.Rollback()
response.WriteServerError(w, method, err)
h.Runtime.Log.Error(method, err)
return
}
}
err = h.Store.Document.Update(ctx, d)