fix(data): Correct post source field before saving to fix community filtering
This commit is contained in:
@@ -211,6 +211,12 @@ def collect_platform(platform: str, community: str, start_date: str, end_date: s
|
||||
if post_id in index:
|
||||
continue
|
||||
|
||||
# ====================================================================
|
||||
# FIX: Correct the post's source field BEFORE saving
|
||||
# ====================================================================
|
||||
post['source'] = community if community else platform
|
||||
# ====================================================================
|
||||
|
||||
# Save post
|
||||
post_uuid = save_post(post, platform, index, dirs)
|
||||
added_count += 1
|
||||
|
||||
Reference in New Issue
Block a user