Skip to content

Commit

Permalink
DEBUG: print raw DB data b/c I can't reproduce the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Apr 19, 2023
1 parent d933626 commit fe746ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_tenants/postgresql_backend/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def __init__(self, cursor, connection):

def __enter__(self):
self.cursor.execute('SHOW search_path')
self.original_search_path = self.cursor.fetchone()[0].split(',')
raw_data = self.cursor.fetchone()
print("***** DEBUG: raw data from Postgres:", raw_data)
self.original_search_path = raw_data[0].split(',')
self.cursor.execute(f"SET search_path = '{self.connection.schema_name}'")

def __exit__(self, *args, **kwargs):
Expand Down

0 comments on commit fe746ac

Please sign in to comment.