Skip to content

Commit

Permalink
fix: "Apps aren't loaded yet" error
Browse files Browse the repository at this point in the history
  • Loading branch information
lfavole committed Oct 8, 2024
1 parent 70d5df9 commit 055dac0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions website/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class TestError(Exception):
"""
An error for testing the 500 error page.
"""
2 changes: 1 addition & 1 deletion website/settings/logging.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from website.views import TestError
from website.errors import TestError

from .env import SENTRY_DSN, PRODUCTION, BASE_DIR

Expand Down
8 changes: 2 additions & 6 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
from website.utils.http import encode_filename
from website.utils.permission import has_permission

from .errors import TestError

try:
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent))
fetch = importlib.import_module(".fetch", "scripts").main
Expand All @@ -64,12 +66,6 @@ def google(_request, id):
raise Http404()


class TestError(Exception):
"""
An error for testing the 500 error page.
"""


def make_error(request):
"""
This view doesn't return a page, it always fails with `TestError`.
Expand Down

0 comments on commit 055dac0

Please sign in to comment.