Skip to content

Commit 8196cd6

Browse files
authoredMar 18, 2025··
Merge pull request #225 from internetarchive/fix/features-missing-in-fakeload
Fix ctx.features missing in fakeload
2 parents ff20c22 + f06fa55 commit 8196cd6

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
 

‎infogami/utils/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def path_processor(handler):
258258
# that causes infinite redicts when web.ctx.path startswith "//"
259259
raise web.seeother(web.ctx.home + npath + web.ctx.query)
260260
else:
261-
raise app.notfound
261+
raise app.notfound()
262262
else:
263263
return handler()
264264

‎infogami/utils/delegate.py

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def fakeload():
4545
context.user = None
4646
web.ctx.site = create_site()
4747

48+
# Load features
49+
features.loadhook()
50+
4851

4952
def initialize_context():
5053
web.ctx.site = create_site()

‎infogami/utils/features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def loadhook():
5252

5353
def is_enabled(flag):
5454
"""Tests whether the given feature flag is enabled for this request."""
55-
return flag in web.ctx.features
55+
return flag in context.features
5656

5757

5858
def filter_disabled():

0 commit comments

Comments
 (0)
Please sign in to comment.