mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Fixed #124 for compact
This commit is contained in:
parent
1d20151481
commit
925934b6e4
|
@ -235,12 +235,12 @@ def compact_formatter(action, change, parsed_comment, categories):
|
|||
return
|
||||
if "sitewide" not in change["logparams"]:
|
||||
restriction_description = ""
|
||||
if change["logparams"]["restrictions"]["pages"]:
|
||||
if "pages" in change["logparams"]["restrictions"] and change["logparams"]["restrictions"]["pages"]:
|
||||
restriction_description = _(" on pages: ")
|
||||
for page in change["logparams"]["restrictions"]["pages"]:
|
||||
restricted_pages = ["*{page}*".format(page=i["page_title"]) for i in change["logparams"]["restrictions"]["pages"]]
|
||||
restriction_description = restriction_description + ", ".join(restricted_pages)
|
||||
if change["logparams"]["restrictions"]["namespaces"]:
|
||||
if "namespaces" in change["logparams"]["restrictions"] and change["logparams"]["restrictions"]["namespaces"]:
|
||||
namespaces = []
|
||||
if restriction_description:
|
||||
restriction_description = restriction_description + _(" and namespaces: ")
|
||||
|
|
Loading…
Reference in a new issue