[pp:mtime] do not overwrite '_mtime' for None values (#5439)
This commit is contained in:
@@ -33,6 +33,9 @@ class MtimePP(PostProcessor):
|
||||
|
||||
def run(self, pathfmt):
|
||||
mtime = self._get(pathfmt.kwdict)
|
||||
if mtime is None:
|
||||
return
|
||||
|
||||
pathfmt.kwdict["_mtime"] = (
|
||||
util.datetime_to_timestamp(mtime)
|
||||
if isinstance(mtime, datetime) else
|
||||
|
||||
Reference in New Issue
Block a user