Misc cleanup

This commit is contained in:
Jeremy Stretch 2025-04-07 16:49:57 -04:00
parent 2e52014828
commit 00ab899604

View File

@ -117,9 +117,6 @@ class BaseTable(tables.Table):
""" """
Update the table sequence to display only the named columns and any exempt columns. Update the table sequence to display only the named columns and any exempt columns.
""" """
if not selected_columns:
raise Exception('wtf?')
# Hide non-selected columns which are not exempt # Hide non-selected columns which are not exempt
for column in self.columns: for column in self.columns:
if column.name not in [*selected_columns, *self.exempt_columns]: if column.name not in [*selected_columns, *self.exempt_columns]:
@ -187,10 +184,12 @@ class BaseTable(tables.Table):
@property @property
def configuration(self): def configuration(self):
return { config = {
'columns': ','.join([c[0] for c in self.selected_columns]), 'columns': ','.join([c[0] for c in self.selected_columns]),
'ordering': self.order_by,
} }
if self.order_by:
config['ordering'] = self.order_by
return config
@property @property
def config_params(self): def config_params(self):