diff options
| -rw-r--r-- | pydis_site/apps/guides/views/guide.py | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/pydis_site/apps/guides/views/guide.py b/pydis_site/apps/guides/views/guide.py index cb30a525..deb1b8c4 100644 --- a/pydis_site/apps/guides/views/guide.py +++ b/pydis_site/apps/guides/views/guide.py @@ -21,6 +21,9 @@ class GuideView(View):              category_name = None          else:              dir_path = os.path.join(settings.BASE_DIR, "pydis_site", "apps", "guides", "resources", "guides", category) +            if not os.path.exists(dir_path) or not os.path.isdir(dir_path): +                raise Http404("Category not found.") +              path = os.path.join(dir_path, f"{guide}.md")              with open(os.path.join(dir_path, "_info.yml")) as f:                  category_name = yaml.load(f.read())["name"] | 
