You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/06/04 13:40:03 UTC
[incubator-ponymail-foal] branch master updated: Simplify
This is an automated email from the ASF dual-hosted git repository.
sebb 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 c46d29f Simplify
c46d29f is described below
commit c46d29fe5d3165ba8db6a8933196cf8fd229ac4d
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jun 4 14:39:47 2021 +0100
Simplify
---
server/endpoints/mgmt.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/endpoints/mgmt.py b/server/endpoints/mgmt.py
index d800d1d..9b6b977 100644
--- a/server/endpoints/mgmt.py
+++ b/server/endpoints/mgmt.py
@@ -69,7 +69,7 @@ async def process(
new_from = indata.get("from")
new_subject = indata.get("subject")
new_list = indata.get("list", "")
- private = True if indata.get("private", "no") == "yes" else False
+ private = indata.get("private", "no") == "yes"
new_body = indata.get("body", "")
# Check for consistency so we don't pollute the database
@@ -111,10 +111,10 @@ async def process(
await plugins.auditlog.add_entry(session, action="edit", target=doc, lid=lid,
log= f"Edited email {doc} from {origin_lid} archives ({origin_lid} -> {lid})")
- return aiohttp.web.Response(headers={}, status=200, text=f"Email successfully saved")
- return aiohttp.web.Response(headers={}, status=404, text=f"Email not found!")
+ return aiohttp.web.Response(headers={}, status=200, text="Email successfully saved")
+ return aiohttp.web.Response(headers={}, status=404, text="Email not found!")
- return aiohttp.web.Response(headers={}, status=404, text=f"Unknown mgmt command requested")
+ return aiohttp.web.Response(headers={}, status=404, text="Unknown mgmt command requested")
def register(server: plugins.server.BaseServer):