Redundant code in set_tenant as set_schema(). Make it DRY

This commit is contained in:
viatrak 2017-09-07 12:41:12 -05:00
parent 953040943d
commit 86c4050856
1 changed files with 1 additions and 4 deletions

View File

@ -67,11 +67,8 @@ class DatabaseWrapper(original_backend.DatabaseWrapper):
Main API method to current database schema,
but it does not actually modify the db connection.
"""
self.set_schema(tenant.schema_name, include_public)
self.tenant = tenant
self.schema_name = tenant.schema_name
self.include_public_schema = include_public
self.set_settings_schema(self.schema_name)
self.search_path_set = False
def set_schema(self, schema_name, include_public=True):
"""