Skip to content

Commit c796aa8

Browse files
Iakov Gandarken99
authored andcommitted
refactor template processing
1 parent 983aadb commit c796aa8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cid/common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,11 +1091,11 @@ def get_view_query(self, view_name: str) -> str:
10911091
).decode('utf-8'))
10921092

10931093
# Prepare template parameters
1094-
columns_tpl = {}
1095-
if cur_required:
1096-
columns_tpl["cur_table_name"] = self.cur.tableName
1097-
columns_tpl["athenaTableName"] = view_name
1098-
columns_tpl["athena_database_name"] = self.athena.DatabaseName
1094+
columns_tpl = {
1095+
'cur_table_name': self.cur.tableName if cur_required else None,
1096+
'athenaTableName': view_name,
1097+
'athena_database_name': self.athena.DatabaseName,
1098+
}
10991099

11001100
for k, v in view_definition.get('parameters', dict()).items():
11011101
if isinstance(v, str):

0 commit comments

Comments
 (0)