Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update add_location_site_view_tenant #4076

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bims/management/commands/add_location_site_view_tenant.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def add_arguments(self, parser):

def create_sql_query(self, view_name, query, schema_name):
sql = (
'CREATE OR REPLACE VIEW {schema_name}.{view_name} AS {sql_raw}'.
'CREATE OR REPLACE VIEW {view_name} AS {sql_raw}'.
format(
schema_name=schema_name,
view_name=view_name,
Expand All @@ -24,7 +24,7 @@ def create_sql_query(self, view_name, query, schema_name):

def handle(self, *args, **options):
schema_name = options.get('schema_name')
view_name = f'default_{schema_name}_location_site_cluster'
view_name = f'{schema_name}.default_location_site_cluster'
query = (
f'SELECT {schema_name}.bims_locationsite.id AS site_id,'
f'{schema_name}.bims_locationsite.geometry_point, {schema_name}.bims_locationsite.name, {schema_name}.bims_locationsite.ecosystem_type '
Expand Down