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

Re-sync space counts when moving docs

Between spaces!
This commit is contained in:
HarveyKandola 2019-09-24 14:07:44 +01:00
parent fad1de2e41
commit 5cef58eeba

View file

@ -312,6 +312,9 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request) {
ctx.Transaction.Commit()
h.Store.Space.SetStats(ctx, d.SpaceID)
if oldDoc.SpaceID != d.SpaceID {
h.Store.Space.SetStats(ctx, oldDoc.SpaceID)
}
h.Store.Audit.Record(ctx, audit.EventTypeDocumentUpdate)
// Live document indexed for search.