Zelyanoth commited on
Commit
6431ea5
·
1 Parent(s): f301a8d
Files changed (1) hide show
  1. backend/api/sources.py +2 -1
backend/api/sources.py CHANGED
@@ -106,11 +106,12 @@ def add_source():
106
  current_app.logger.warning(f"Content service failed, storing in database directly: {str(e)}")
107
 
108
  # Store source directly in Supabase
 
109
  response = (
110
  current_app.supabase
111
  .table("Source")
112
  .insert({
113
- "url": source_url,
114
  "user_id": user_id,
115
  "created_at": "now()"
116
  })
 
106
  current_app.logger.warning(f"Content service failed, storing in database directly: {str(e)}")
107
 
108
  # Store source directly in Supabase
109
+ # Corrected column name from 'url' to 'source' to match the database schema
110
  response = (
111
  current_app.supabase
112
  .table("Source")
113
  .insert({
114
+ "source": source_url, # Changed 'url' to 'source'
115
  "user_id": user_id,
116
  "created_at": "now()"
117
  })