Fix a crash

This commit is contained in:
Frisk 2020-11-18 14:05:31 +01:00
parent 946d25de48
commit 1a3f4f6b39
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -57,9 +57,7 @@ def format_user(change, recent_changes, action):
"Current params user {} and state of map_ips {}".format(change["user"], recent_changes.map_ips))
if action in ("edit", "new"):
recent_changes.map_ips[change["user"]] += 1
if settings.get("hide_ips", False):
change["user"] = _("Unregistered user")
change["user"] = "{author} ({amount})".format(author=change["user"],
change["user"] = "{author} ({amount})".format(author=change["user"] if settings.get("hide_ips", False) is False else _("Unregistered user"),
amount=recent_changes.map_ips[change["user"]])
else:
author_url = create_article_path("User:{}".format(change["user"].replace(" ", "_")))