Copypaste fail from moving logic out to turn a date to a string ('value' -> 'dt)
(badges.py)
This commit is contained in:
parent
13cf49ac5d
commit
7223e76e24
1 changed files with 2 additions and 2 deletions
|
@ -15,10 +15,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
return datetime.datetime.strptime(dt, DATETIME_FORMAT)
|
return datetime.datetime.strptime(dt, DATETIME_FORMAT)
|
||||||
|
|
||||||
def _parse_date(self, dt: str):
|
def _parse_date(self, dt: str):
|
||||||
if value.lower() == "today":
|
if dt.lower() == "today":
|
||||||
return self._now()
|
return self._now()
|
||||||
else:
|
else:
|
||||||
match = RE_HUMAN_FORMAT.match(value)
|
match = RE_HUMAN_FORMAT.match(dt)
|
||||||
if not match:
|
if not match:
|
||||||
raise utils.EventError("Invalid date format, please use %s" %
|
raise utils.EventError("Invalid date format, please use %s" %
|
||||||
HUMAN_FORMAT_HELP)
|
HUMAN_FORMAT_HELP)
|
||||||
|
|
Loading…
Reference in a new issue