File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
mkdocs_git_revision_date_localized_plugin Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ def on_page_markdown(
199
199
200
200
# Retrieve git commit timestamp
201
201
# Except for generated pages (f.e. by mkdocs-gen-files plugin)
202
- if hasattr (page .file , "generated_by" ):
202
+ if getattr (page .file , "generated_by" , None ):
203
203
last_revision_timestamp = int (time .time ())
204
204
else :
205
205
last_revision_timestamp = self .util .get_git_commit_timestamp (
@@ -258,7 +258,7 @@ def on_page_markdown(
258
258
259
259
# Retrieve git commit timestamp
260
260
# Except for generated pages (f.e. by mkdocs-gen-files plugin)
261
- if hasattr (page .file , "generated_by" ):
261
+ if getattr (page .file , "generated_by" , None ):
262
262
first_revision_timestamp = int (time .time ())
263
263
else :
264
264
first_revision_timestamp = self .util .get_git_commit_timestamp (
You can’t perform that action at this time.
0 commit comments