Skip to content

Commit

Permalink
Handle 404 for engage pages that don't exist (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
carkod authored Aug 11, 2022
1 parent 2e69c9e commit 36b85c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions canonicalwebteam/discourse/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ def get_engage_page(self, path):
single_topic[0]
except KeyError:
return None
# No metadata found if single_topic = []
except IndexError:
return None

metadata = self.parse_topics(single_topic[0])

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="canonicalwebteam.discourse",
version="5.0.0",
version="5.0.1",
author="Canonical webteam",
author_email="[email protected]",
url=(
Expand Down

0 comments on commit 36b85c8

Please sign in to comment.