Skip to content

Commit 6f2b516

Browse files
authored
Merge pull request #218 from Morioki/schema-fix
fix: pass schema to postgrest initialization
2 parents 53a6c95 + c71261f commit 6f2b516

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

supabase/client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(
5858
rest_url=self.rest_url,
5959
supabase_key=self.supabase_key,
6060
headers=options.headers,
61+
schema=options.schema,
6162
)
6263

6364
def storage(self) -> SupabaseStorageClient:
@@ -151,12 +152,10 @@ def _init_supabase_auth_client(
151152

152153
@staticmethod
153154
def _init_postgrest_client(
154-
rest_url: str,
155-
supabase_key: str,
156-
headers: Dict[str, str],
155+
rest_url: str, supabase_key: str, headers: Dict[str, str], schema: str
157156
) -> SyncPostgrestClient:
158157
"""Private helper for creating an instance of the Postgrest client."""
159-
client = SyncPostgrestClient(rest_url, headers=headers)
158+
client = SyncPostgrestClient(rest_url, headers=headers, schema=schema)
160159
client.auth(token=supabase_key)
161160
return client
162161

0 commit comments

Comments
 (0)