Skip to content

Commit

Permalink
fix generate sql when column is deleted (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 authored Oct 22, 2024
1 parent ebaad18 commit cb60b53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion repo_metadata/view_data_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,8 +1076,10 @@ def _generator_filters_sql(self, filters, filter_conjunction = 'And'):
column = column_key and self._get_column_by_key(column_key)
if not column:
column = column_name and self._get_column_by_name(column_name)
# skip when the column is deleted
if not column:
raise ValueError('Column not found column_key: %s column_name: %s' % (column_key, column_name))
logger.error('Column not found column_key: %s column_name: %s' % (column_key, column_name))
continue

if filter_item.get('filter_predicate') == 'include_me':
filter_item['filter_term'] = [self.username]
Expand Down

0 comments on commit cb60b53

Please sign in to comment.