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:
parent
19a916a4b4
commit
5fb41e9fb1
3 changed files with 23 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue