mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fixed namespaces crash
This commit is contained in:
parent
61a3cadcaa
commit
40ccf6b067
|
@ -132,8 +132,8 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c
|
||||||
else:
|
else:
|
||||||
restriction_description = _(" on namespaces: ")
|
restriction_description = _(" on namespaces: ")
|
||||||
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
||||||
if str(namespace) in additional_data.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
if str(namespace) in additional_data["namespaces"]: # if we have cached namespace name for given namespace number, add its name to the list
|
||||||
namespaces.append("*{ns}*".format(ns=additional_data.namespaces[str(namespace)]["*"]))
|
namespaces.append("*{ns}*".format(ns=additional_data["namespaces"][str(namespace)]["*"]))
|
||||||
else:
|
else:
|
||||||
namespaces.append("*{ns}*".format(ns=namespace))
|
namespaces.append("*{ns}*".format(ns=namespace))
|
||||||
restriction_description = restriction_description + ", ".join(namespaces)
|
restriction_description = restriction_description + ", ".join(namespaces)
|
||||||
|
@ -768,8 +768,8 @@ async def embed_formatter(action, change, parsed_comment, categories, recent_cha
|
||||||
else:
|
else:
|
||||||
restriction_description = _("Blocked from editing pages on following namespaces: ")
|
restriction_description = _("Blocked from editing pages on following namespaces: ")
|
||||||
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
for namespace in change["logparams"]["restrictions"]["namespaces"]:
|
||||||
if str(namespace) in additional_data.namespaces: # if we have cached namespace name for given namespace number, add its name to the list
|
if str(namespace) in additional_data["namespaces"]: # if we have cached namespace name for given namespace number, add its name to the list
|
||||||
namespaces.append("*{ns}*".format(ns=additional_data.namespaces[str(namespace)]["*"]))
|
namespaces.append("*{ns}*".format(ns=additional_data["namespaces"][str(namespace)]["*"]))
|
||||||
else:
|
else:
|
||||||
namespaces.append("*{ns}*".format(ns=namespace))
|
namespaces.append("*{ns}*".format(ns=namespace))
|
||||||
restriction_description = restriction_description + ", ".join(namespaces)
|
restriction_description = restriction_description + ", ".join(namespaces)
|
||||||
|
|
Loading…
Reference in a new issue