Fix missing space before "and" in package list

Example message which I recently received:

> The following packages may be outdated: Gaugesand More Ores

This should now be:

> The following packages may be outdated: Gauges and More Ores
This commit is contained in:
Hugo Locurcio 2022-01-22 16:44:52 +01:00
parent 85a178d90e
commit 865e0e5886
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 3 additions and 3 deletions

View File

@ -187,10 +187,10 @@ def run_update_config():
def _package_list(packages: List[str]):
# Who needs translations?
if len(packages) >= 3:
packages[len(packages) - 1] = "and " + packages[len(packages) - 1]
packages[len(packages) - 1] = " and " + packages[len(packages) - 1]
packages_list = ", ".join(packages)
else:
packages_list = "and ".join(packages)
packages_list = " and ".join(packages)
return packages_list
@action("Send WIP package notification")
@ -287,4 +287,4 @@ def delete_inactive_users():
users = User.query.filter(User.is_active==False, User.packages==None, User.forum_topics==None, User.rank==UserRank.NOT_JOINED).all()
for user in users:
db.session.delete(user)
db.session.commit()
db.session.commit()