fix: load cached FB posts for admin users (user_company_ids=None)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Admin's _get_user_company_ids returns None meaning all companies, but iterating over None gave empty list. Now falls back to fb_stats keys. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
38b2372f7e
commit
8f71b040ad
@ -116,7 +116,8 @@ def social_publisher_list():
|
||||
|
||||
# Load cached FB posts from DB for instant rendering
|
||||
cached_fb_posts = {}
|
||||
for cid in (user_company_ids or []):
|
||||
cache_company_ids = user_company_ids if user_company_ids is not None else list(fb_stats.keys())
|
||||
for cid in cache_company_ids:
|
||||
cached = social_publisher.get_cached_posts(cid)
|
||||
if cached:
|
||||
cached_fb_posts[cid] = cached
|
||||
|
||||
Loading…
Reference in New Issue
Block a user