Skip to content

Commit 8d3ab2c

Browse files
feat: Add feature toggles and general settings to user context
- Update the `inject_settings` function in `src/models/__init__.py` to include the `feature_toggles_settings` and `general_settings` variables in the returned dictionary - This allows the user dashboard to access and display the feature toggles and general settings for authenticated users
1 parent 7667eaa commit 8d3ab2c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
@app.cli.command("run")
1515
def server_start():
1616
print("Server started")
17+

src/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
@app.context_processor
5858
def inject_settings():
5959
if current_user.is_anonymous:
60-
return dict(user_dashboard_settings=None, card_settings=None)
60+
return dict(user_dashboard_settings=None, card_settings=None, feature_toggles_settings=None, general_settings=None)
6161
general_settings = ApplicationGeneralSettings.query.first()
6262
card_settings = UserCardSettings.query.filter_by(user_id=current_user.id).first()
6363
user_dashboard_settings = UserDashboardSettings.query.filter_by(

0 commit comments

Comments
 (0)