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 2022/02/08 13:16:45 UTC
[incubator-ponymail-foal] 01/02: Better variable name
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
commit e4015e933ad5b2fac4e28709a40097413bbe7d39
Author: Sebb <se...@apache.org>
AuthorDate: Tue Feb 8 13:16:13 2022 +0000
Better variable name
---
server/plugins/messages.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index 56f97ee..fcc0182 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -228,14 +228,14 @@ async def get_email(
# If using old shortened hex IDs, regexp for them instead of a direct match
if len(permalink) == OLD_SHORTENED_ID_LENGTH and re.match(r"^[a-f0-9]+$", permalink):
permalink += ".+"
- aggtype = "regexp"
+ matchtype = "regexp"
else:
- aggtype = "term"
+ matchtype = "term"
res = await session.database.search(
index=doctype,
size=1,
body={
- "query": {"bool": {"must": [{aggtype: {"permalinks": permalink}}]}}
+ "query": {"bool": {"must": [{matchtype: {"permalinks": permalink}}]}}
},
)
if len(res["hits"]["hits"]) == 1: