Skip to content

Commit

Permalink
Make the check actually safe
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin authored Nov 11, 2023
1 parent c2d432b commit c255498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkdocs_git_revision_date_localized_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def on_page_markdown(

# Retrieve git commit timestamp
# Except for generated pages (f.e. by mkdocs-gen-files plugin)
if getattr(page.file, "generated_by"):
if getattr(page.file, "generated_by", None):
last_revision_timestamp = int(time.time())
else:
last_revision_timestamp = self.util.get_git_commit_timestamp(
Expand Down Expand Up @@ -258,7 +258,7 @@ def on_page_markdown(

# Retrieve git commit timestamp
# Except for generated pages (f.e. by mkdocs-gen-files plugin)
if getattr(page.file, "generated_by"):
if getattr(page.file, "generated_by", None):
first_revision_timestamp = int(time.time())
else:
first_revision_timestamp = self.util.get_git_commit_timestamp(
Expand Down

0 comments on commit c255498

Please sign in to comment.