mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Adding a hotfix for important issue
This commit is contained in:
parent
d37867d1f5
commit
33596dc0c3
|
@ -589,8 +589,11 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
|
|||
english_length = english_length.rstrip("s").strip()
|
||||
block_time = _("for {num} {translated_length}").format(num=english_length_num, translated_length=ngettext(english_length, english_length + "s", int(english_length_num)))
|
||||
except (AttributeError, ValueError):
|
||||
date_time_obj = datetime.datetime.strptime(change["logparams"]["expiry"], '%Y-%m-%dT%H:%M:%SZ')
|
||||
block_time = _("until {}").format(date_time_obj.strftime("%Y-%m-%d %H:%M:%S UTC"))
|
||||
if "expiry" in change["logparams"]:
|
||||
date_time_obj = datetime.datetime.strptime(change["logparams"]["expiry"], '%Y-%m-%dT%H:%M:%SZ')
|
||||
block_time = _("until {}").format(date_time_obj.strftime("%Y-%m-%d %H:%M:%S UTC"))
|
||||
else:
|
||||
block_time = _("unknown expiry time") # THIS IS HERE JUST TEMPORARY AS A HOT FIX TO #157, will be changed with release of 1.13
|
||||
if "sitewide" not in change["logparams"]:
|
||||
restriction_description = ""
|
||||
if "pages" in change["logparams"]["restrictions"] and change["logparams"]["restrictions"]["pages"]:
|
||||
|
|
Loading…
Reference in a new issue