You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/27 00:00:15 UTC
[incubator-ponymail-foal] branch master updated: fix source not
updating properly
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 5d0fc08 fix source not updating properly
new 4cffe59 Merge branch 'master' of github.com:apache/incubator-ponymail-foal
5d0fc08 is described below
commit 5d0fc08450f8a11cffef10bb09841d6b38b2d6d7
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Sep 26 18:59:51 2021 -0500
fix source not updating properly
---
server/endpoints/mgmt.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/endpoints/mgmt.py b/server/endpoints/mgmt.py
index c503338..db2b410 100644
--- a/server/endpoints/mgmt.py
+++ b/server/endpoints/mgmt.py
@@ -116,12 +116,13 @@ async def process(
# Fetch source, mark as deleted (modified) and save IF anything but just privacy changed
# We do this, as we can't edit the source easily, so we mark it as off-limits instead.
if not privacy_only:
- source = await plugins.messages.get_source(session, permalink=email["id"], raw=True)
+ source = await plugins.messages.get_source(session, permalink=email["dbid"], raw=True)
if source:
+ docid = source["_id"]
source = source["_source"]
source["deleted"] = True
await session.database.update(
- index=session.database.dbs.source, body={"doc": email}, id=email["id"],
+ index=session.database.dbs.source, body={"doc": source}, id=docid,
)
await plugins.auditlog.add_entry(session, action="edit", target=doc, lid=lid,