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 <[email protected]>
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):

Reply via email to