Don't increase the edit count when some other action than edit/new page

This commit is contained in:
Frisk 2018-12-24 12:38:45 +01:00
parent 639b7ccf3c
commit 1fd15b6a95

View file

@ -153,7 +153,8 @@ def webhook_formatter(action, STATIC, **params):
else: else:
logging.debug( logging.debug(
"2Current params user {} and state of map_ips {}".format(params["user"], recent_changes.map_ips)) "2Current params user {} and state of map_ips {}".format(params["user"], recent_changes.map_ips))
recent_changes.map_ips[params["user"]] += 1 if action in ("edit", "new"):
recent_changes.map_ips[params["user"]] += 1
params["user"] = "{author} ({amount})".format(author=params["user"], params["user"] = "{author} ({amount})".format(author=params["user"],
amount=recent_changes.map_ips[params["user"]]) amount=recent_changes.map_ips[params["user"]])
else: else: