We shouldn't call dateutil.parser if t has already been deserialized to a datetime.

This commit is contained in:
Fabio Manganiello 2023-09-27 11:20:10 +02:00
parent c311987741
commit ca7f042ccc
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -82,7 +82,9 @@ class RssPlugin(RunnablePlugin):
t = var.get(varname)
if t:
return dateutil.parser.isoparse(t)
if not isinstance(t, datetime.datetime):
t = dateutil.parser.isoparse(t)
return t
return None