Skip to content

Commit

Permalink
corrected type check for custom_sql relations
Browse files Browse the repository at this point in the history
  • Loading branch information
HudsonMC16 committed Oct 23, 2020
1 parent 1cb0b69 commit 525f67f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tableau_documents/table_relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def _read_existing_relations(self):

@property
def main_custom_sql(self) -> str:
if self.main_table.get('type') == 'stored-proc':
if self.main_table.get('type') == 'text':
return self.main_table.text
else:
raise InvalidOptionException('Data Source does not have Custom SQL defined')

@main_custom_sql.setter
def main_custom_sql(self, new_custom_sql: str):
if self.main_table.get('type') == 'stored-proc':
if self.main_table.get('type') == 'text':
self.main_table.text = new_custom_sql
else:
raise InvalidOptionException('Data Source does not have Custom SQL defined')
Expand Down

0 comments on commit 525f67f

Please sign in to comment.