mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Handle null table in TableConfigForm
This commit is contained in:
parent
bf836c9bc2
commit
3b894f9ccb
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user