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:
chelsea
2025-10-12 16:30:21 -05:00
parent e40d5463a6
commit 9d286c8466

32
app.py
View File

@@ -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: