Handle null table in TableConfigForm

This commit is contained in:
Brian Tiemann 2025-02-25 06:11:59 -05:00
parent 2a56c08bc8
commit f26f4947bc

View File

@ -132,8 +132,9 @@ class TableConfigForm(forms.Form):
super().__init__(*args, **kwargs)
# Initialize columns field based on table attributes
self.fields['available_columns'].choices = table.available_columns
self.fields['columns'].choices = table.selected_columns
if table:
self.fields['available_columns'].choices = table.available_columns
self.fields['columns'].choices = table.selected_columns
@property
def table_name(self):