mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Check if DEFAULT_USER_PREFERENCES are configured
This commit is contained in:
parent
22af6dd05f
commit
62148bb83c
@ -66,7 +66,7 @@ class BaseTable(tables.Table):
|
||||
selected_columns = None
|
||||
if user is not None and not isinstance(user, AnonymousUser):
|
||||
selected_columns = user.config.get(f"tables.{self.name}.columns")
|
||||
elif isinstance(user, AnonymousUser):
|
||||
elif isinstance(user, AnonymousUser) and hasattr(settings, 'DEFAULT_USER_PREFERENCES'):
|
||||
default_user_preferences = settings.DEFAULT_USER_PREFERENCES
|
||||
default_table = default_user_preferences.get('tables', {}).get(self.name, {}).get('columns', {})
|
||||
if default_table != {}:
|
||||
|
Loading…
Reference in New Issue
Block a user