File size: 571 Bytes
70bc888
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
from supabase import create_client
from dotenv import load_dotenv

load_dotenv('/workspaces/govbridge/.env')
sb = create_client(os.getenv('SUPABASE_URL'), os.getenv('SUPABASE_KEY'))

res = sb.table('schemes').select('id, title, full_description').execute()
for r in res.data:
    if r['full_description'] and "Key Benefits:" in r['full_description']:
        new_desc = r['full_description'].replace("Key Benefits:", "").strip()
        sb.table('schemes').update({'full_description': new_desc}).eq('id', r['id']).execute()
        print(f"Fixed {r['title']}")