diff --git a/facebook_graph_service.py b/facebook_graph_service.py index 164c27a..a16d776 100644 --- a/facebook_graph_service.py +++ b/facebook_graph_service.py @@ -586,7 +586,7 @@ def sync_facebook_to_social_media(db, company_id: int) -> dict: csm.last_checked_at = now # Store all API fields in content_types JSONB (no migration needed) - extra = csm.content_types or {} + extra = dict(csm.content_types or {}) # Page info fields for key in ('category', 'website', 'phone', 'founded', 'mission'): if page_info.get(key): @@ -639,7 +639,7 @@ def sync_facebook_to_social_media(db, company_id: int) -> dict: csm.content_types = extra # Append to followers_history - history = csm.followers_history or [] + history = list(csm.followers_history or []) if followers > 0: today_str = now.strftime('%Y-%m-%d') # Don't duplicate entries for the same day