Fix community settings page 500 error - missing platform config loading
## Problem Fixed: The /settings/communities page was throwing a 500 error with: `NameError: name 'platform_config' is not defined` ## Root Cause: In the settings_communities() function, I was trying to use platform_config without loading it first using the load_platform_config() function. ## Solution: Added platform_config = load_platform_config() before using the variable. This fixes the 500 error when users try to access community settings. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
3
app.py
3
app.py
@@ -1399,6 +1399,9 @@ def settings_communities():
|
|||||||
# Get available communities from platform config and collection targets
|
# Get available communities from platform config and collection targets
|
||||||
available_communities = []
|
available_communities = []
|
||||||
|
|
||||||
|
# Load platform configuration
|
||||||
|
platform_config = load_platform_config()
|
||||||
|
|
||||||
# Get enabled communities from collection_targets (what's actually being crawled)
|
# Get enabled communities from collection_targets (what's actually being crawled)
|
||||||
enabled_communities = set()
|
enabled_communities = set()
|
||||||
for target in platform_config.get('collection_targets', []):
|
for target in platform_config.get('collection_targets', []):
|
||||||
|
|||||||
Reference in New Issue
Block a user