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

check table existance for source that is non-INTERLIS #106

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/gpkg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners):
return cursor

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
cursor = self.conn.cursor()

Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/mssql_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,9 @@ def get_iliname_dbname_mapping(self, sqlnames=list()):
return result

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
if self.schema:
cur = self.conn.cursor()
Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/pg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners):
return {}

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
if self.schema:
cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
Expand Down
Loading