Fix IndentationError causing logged-in users to see no feed
The issue was caused by incorrect indentation in the community filtering logic (lines 451-468) which prevented the app from starting properly. Fixed: - Corrected 13-space indentation to 12 spaces for proper Python syntax - Ensured consistent 4-space tab width throughout the block This resolves the urgent issue where logged-in users couldn't see their feed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
app.py
32
app.py
@@ -448,24 +448,24 @@ def api_posts():
|
||||
if platform and post_data.get('platform', '').lower() != platform.lower():
|
||||
continue
|
||||
|
||||
# Apply user's community preferences (before filterset)
|
||||
if user_communities:
|
||||
post_source = post_data.get('source', '').lower()
|
||||
post_platform = post_data.get('platform', '').lower()
|
||||
# Apply user's community preferences (before filterset)
|
||||
if user_communities:
|
||||
post_source = post_data.get('source', '').lower()
|
||||
post_platform = post_data.get('platform', '').lower()
|
||||
|
||||
# Check if this post matches any of the user's selected communities
|
||||
matches_community = False
|
||||
for selected_community in user_communities:
|
||||
selected_community = selected_community.lower()
|
||||
# Match by exact source name or platform name
|
||||
if (post_source == selected_community or
|
||||
post_platform == selected_community or
|
||||
selected_community in post_source):
|
||||
matches_community = True
|
||||
break
|
||||
# Check if this post matches any of the user's selected communities
|
||||
matches_community = False
|
||||
for selected_community in user_communities:
|
||||
selected_community = selected_community.lower()
|
||||
# Match by exact source name or platform name
|
||||
if (post_source == selected_community or
|
||||
post_platform == selected_community or
|
||||
selected_community in post_source):
|
||||
matches_community = True
|
||||
break
|
||||
|
||||
if not matches_community:
|
||||
continue
|
||||
if not matches_community:
|
||||
continue
|
||||
|
||||
# Apply search filter (before filterset)
|
||||
if search_query:
|
||||
|
||||
Reference in New Issue
Block a user