From 525f67faebc31f0e47473f3ede1ef8bb2df9edba Mon Sep 17 00:00:00 2001 From: Cole Hudson Date: Fri, 23 Oct 2020 12:22:35 -0500 Subject: [PATCH] corrected type check for custom_sql relations --- tableau_documents/table_relations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tableau_documents/table_relations.py b/tableau_documents/table_relations.py index c1ea942..a320bc9 100644 --- a/tableau_documents/table_relations.py +++ b/tableau_documents/table_relations.py @@ -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')